Site hosted by Build your free website today!

Have you got back from a holiday with multiple cameras and you want to combine images from all of those cameras in a date-time order, so you can get a chronological view? What about if your photos were taken in different time zones, and the date and time settings on the cameras were not set correctly as you passed from one time zone to another? After a recent holiday this is exactly what I ended up with, having four cameras, and hundreds, if not thousands, of images to sort through.

I wanted an application that could take a jpeg file, read the exif data to find the date and time the photo was taken, then use that as part of the renaming of the jpeg file. Also, be able to add a prefix, or suffix to the new file name.

e.g. You have the following files from Alice's camera: 

2015-07-01_11:21:16.jpg and 2015-07-01_23:55:21.jpg

and the following files from Bob's camera:

PICT0267.JPG (taken at 13:51:10 on 1st July 2015) and PICT0269.JPG (taken at 16:20:34 on the same day).

You want these four files in chronological order, named as:

  • 20150701-112116-bob.jpg
  • 20150701-135110-alice.jpg
  • 20150701-162034-alice.jpg
  • 20150701-235521-bob.jpg

I couldn't find a freely available application to do this, so I wrote one in Java, called PhotoEXIFRenamer - this will run on Windows, Linux or a Mac.

To run it, you will need Java installed (it can be the Java from Oracle, or Open JDK).

Run with the following command:

        java -jar PhotoEXIFRename.jar

This will give you the help page showing you the available options:

Valid parameters are:

  -d <directory> or --dir <directory> - to define the directory containing JPEG files to                                             rename.

  -f 1 or --format 1 - use date/time format YYYYMMDD_HHMMSS (default - best for sorting                              files)

  -f 2 or --format 2 - use date/time format YYYY-MM-DD_HH-MM-SS

  -f 3 or --format 3 - use date/time format DDMMYYYY_HHMMSS

  -f 4 or --format 4 - use date/time format DD-MM-YYYY_HH-MM-SS

  -p <prefix> or --prefix <prefix> - a prefix to add to new file names.

  -s <suffix> or --suffix <suffix> - a suffix to add to new file names.

  -a <number> or --adjust-hour <number> - adds the number of hours to the date/time

  -v or --verbose - to output details of each file renamed

  -h or -? or --help - to show this help


Start with JPEG files P000001.jpg P000007.jpg with time/date EXIF data

with values 07:01:23 on 24 May 2015, and 12:19:18 on 24 May 2015.

Also adjust the time by -8 hours.

java PhotEXIFRenamer -d . -p bob- -f 1 --adjust-hour -8

This will rename JPEG files to:


   bob-20150523_230123.jpg and bob-20150524_041918.jpg