Exiftool rename tricks

Page content

Exiftool is a powerful tool to manipulate metadata in files. It can also be used to rename files based on their metadata. Here are some examples of how to use it to rename files.

These commands will rename all files in current directory.

Rename files based on their modification date

exiftool '-FileName<FileModifyDate' -d %Y-%m-%d\ %H.%M.%S%%-c.%%e .

Rename files based on their creation date

exiftool '-FileName<CreateDate' -d %Y-%m-%d\ %H.%M.%S%%-c.%%e .

Depending on the file type and how file was created, some or all metadata might not be available. In that case, the file will not be renamed, and you will receive a warning message.

I suggest trying either version of the command and see which one works best for you.

The datetime format matches the one used by Dropbox when using “Camera Uploads”. This way, the files will be sorted by date in the Dropbox folder.

%Y-%m-%d\ %H.%M.%S%%-c.%%e