Changing image file names based on the EXIF date and time

I name all my photos in the format of “year_month_day__hour_minute_second” e.g. “2009_11_08__10_55_32″. This way I am sure that not 2 images are named the same.

The best way of doing this (in my opinion) is to use Exiftool. Exiftool is a tool to view or modify EXIF information in an image file. Most image files are supported. Exiftool can be found here:

Download the Windows executable (the following goes for Windows but can be modified to other platforms).


  • Images is placed in a folder named “c:\images”
  • Exiftool.exe is placed in a folder named “D:\data\exiftool.exe”

Changing file names using command prompt:

  1. Open a command prompt
  2. Write the following string: D:\data\exiftool.exe -d %Y_%m_%d__%H_%M_%S%%-c.%%e “-filename<CreateDate” “c:\images”
  3. Pressing enter will rename all image files in the folder using the date and time of the EXIF

Changing file names using a BAT file:

  1. Create a new file and call it <something>.BAT
  2. Open the file for edit and write the string: D:\data\exiftool.exe -d %%Y_%%m_%%d__%%H_%%M_%%S%%%%-c.%%%%e “-filename<CreateDate” %1
  3. Save and close the file
  4. Place the file on your desktop
  5. Dragging a folder onto the BAT file icon on the desktop, and releasing it will now rename all image files in the dragged folder.

Notice: If 2 pictures are taken within the same second, Exiftool will postfix the filename with a number.

This entry was posted in Photo, Programming. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>