Rename By EXIF Date

What is "RenameByEXIFDate"

RenameByEXIFDate is a java application to rename image files with EXIF informations. Normaly digital still foto cameras will take images in JPEG format. Additional to the image data, the digital still foto camera stores many information about the taken picture, in the EXIF information. Normally the EXIF information contains the time and date when the image was taken. This time and date information can be useful to rename the image files.

If you have any hints, bugs or suggestions, do not hasitate to contact me.


Table of content

  1. Rename By EXIF Date
    1. What is "RenameByEXIFDate"
    2. Download
    3. Copyright
    4. Installation
    5. Six steps throw the application
  2. Some Help 
    1. Toolbar
      1. Add image files
      2. Remove selected image files from list:
      3. Remove all image files from list:
      4. Move up/down image files
      5. Preview
      6. Rename
    2. Image file table
      1. Select some image files
      2. Sort the files in the list
    3. File output
      1. Output formate key words
      2. Examples
      3. Copy
      4. Rename
    4. Configuration

Download

Binary application: renamebyexifdate_V2_2_1.jar

Version Info

V02.02.001: MD5sum check to avoid to copy same image more than once.
Busy dialog with backgound thread.
Support to copy also video files of type AVI, MOV, MPG, MP4, WMV
V01.03.001: Bug fixed BusyDialog laypout added to ContentPane. Update help file.
V01.01.002: Warning Dialog on adding images without EXIF information. Update help file.
V01.01.001: Inital Release

Copyright

You are free to use the application. Please send me a short email to let me know if you find it useful. If you have any  suggestions or found some bugs do not hesitate to contact me!
Thanks to Drew Noakes who wrote a very usefull library to extract the EXIF information from an image file.
Visit also Drew Noakes exif library: metadata-extractor library

Installation

  1. If not already done, first install the Java Runtime Environment you can download here: J2RE1.5. Java V1.4.2 will also work
  2. Copy the downloaded file to any location on our file system.
  3. You can try to make a double click on the ".jar" file to start the application. 
  4. If no application starts, try this:
    Make a link, batch file or an application icon with following content
    "C:\Programme\Java\jre1.5.0\bin\javaw.exe -cp renamebyexifdate_V2_2_1.jar de.lorff.renamebyexif.RenameMain"
  5. Double click on the batch file or application icon opens up the application window.

Command line call

Yo could call the Renaming process from command line without a gui.
Just type:
java -cp renamebyexifdate_V2_2_1.jar de.lorff.renamebyexif.RenameByEXIFDate [file2rename.jpg] [destination path] [output format]
Example:
java -cp renamebyexifdate_V2_2_1.jar de.lorff.renamebyexif.RenameByEXIFDate image2rename.jpg c:\temp\bilder yyMMddhhmm_

Six steps through the application

Here are six steps through the application:
  1. Add some image files. The image files MUST contains EXIF inforamtion!
  2. Sort the images by name, date, size or by hand.
  3. Set the output format string.
  4. Select what to do: copy or just make a rename.
  5. If you want to make a copy of the files, set the output directory path.
  6. At last start the renaming process by pressing the rename button.

Some Help 

Application Window

The image below shows the application window. RenameByEXIFDate Application Window

Toolbar

At the top of the application window is the toolbar. The toolbar contains buttons to control the application. The toolbar is floatable, so you can grab toolbar by the left side and drag it out of the application window. With a mouse click on the top right closing icon, the toolbar window slides back into the application window.

Add image files

Before you can start to rename, you have to add some image files. Press the "add file(s)" button with the red "+" on it. A file selection dialoge appears.
In the file selection dialog you can select a single image file or groups of images. The selection behaviour is the same as in the image file table. See "select some image files". You can also select a directory. The application will determine all image files in the directory all directories below. The added image files will be added in the image file table. Files without EXIF information will be refused! In this case you have to confirm a warning dialog.

Remove image files from list

To remove some image files from the table, select the file(s) to remove in the image file table and press the "remove file(s)" button. The files will be taken from list whithout any confirmation!

Remove all image files from list

To remove some image files from the table, select the file(s) to remove in the image file table and press the "remove all file(s)" button. The all files will be taken from list whithout any confirmation!

Move up/down image files

The image files will renamed according the order of in the image file table. By default the order ist set by the EXIF date. You can change the order by the column header (see sort the files in the table) of the table or by hand.
To change the oder by hand you have to select some image file(s) in the table and press the "up" or "down" button.

Preview

On the right there is a splited panel in which you can see a preview of the selected image in the table. and the EXIF information which belongs to the image. The preview cost a lot of performance, so you can switch the preview off or on by pressing the button "preview".

Rename

When all input is done you can start the renaming process by pressing the button "rename". A small window will appear that show you the progress.
After the renaming process
the image files will be removed from the table to avoid inconsistencies with the files on the file system!

Image file table

The image file table stores all files to rename.

Select some image files

To select an image file just select it with the mouse by pressing the left mouse button. You can select more than one by pressing the "Shift" or "CTRL" button on your keyboard. The "Shift" button selects a region from the first slected image to the last selected. The "CTRL" button adds or removes each new selection from the entire selection.
If you switched on the preview option, the image of the last selection will be shown in the right window part. Also the EXIF information will be shown.

Sort the files in the table

To sort the files in the table just press the header of the table. The selected column is marked by a yellow column header. A small arrow icon in the column header shows the sorting order.

File output

The file output format specifies the new name of the image files. Additionally, the application adds a number of three digits at the end of the file name to distinguish the files if there is more than one file with the same name (date). The numbering of the files is the order in the table.
If you add a directory seperators the directory(s) will be added if not exist.

Key words of the output format

Here are the key words to specify the output format.
Symbol Meaning Presentation Example
y year (Number) 1996
M month in year (Text & Number) July & 07
d day in month (Number) 10
h hour in am/pm (1~12) (Number) 12
H hour in day (0~23) (Number) 0
m minute in hour (Number) 30
s second in minute (Number) 55
S millisecond (Number) 978
E day in week (Text) Tuesday
D day in year (Number) 189
F day of week in month (Number) 2 (2nd Wed in July)
w week in year (Number) 27
W week in month (Number) 2
a am/pm marker (Text) PM
k hour in day (1~24) (Number) 24
K hour in am/pm (0~11) (Number) 0
z time zone (Text) Pacific Standard Time
'some text' single quote (Literal) some text

Examples

An Example tells more then 1000 words.
Format EXIF Date Output
'ImageLibrary'\yyyy\MMM\yyMMdd_HHmm_ 08/22/2004 12:04 ImageLibrary\2004\Aug\040822_1204_000.jpg
'Holiday_'yyyyMM_ 08/22/2004 12:04 Holiday_200408_000.jpg
yyyy\MMMMMMMM\dd_ 08/22/2004 12:04, 
08/22/2004 12:14,
08/22/2004 08:02,
11/23/2004 12:12
2004\August\22_000.jpg,
2004\August\22_001.jpg,
2004\August\22_002.jpg,
2004\November\23_00.jpg

Copy

If the toggle button "copy to" is selected you can specify the directory to which the image files in the table will be copied. You can type in the path by hand or press the button "..." to open up a file selection dialog. In the selection dialog you can select the output path in the file system. If new the directory does not exist, the path will restore the last correct path if exist!

Rename

If the toggle button "rename to" is selected the image files will be renamed according to the specified file formate. After the renaming process the image files will be removed from the table to avoid inconsistences with the files on the file system!

Configuration

The configuration will be stored on application exit in the file  "renamebyexif.xfg". The configuration stores the output format, the destination path, the window location and the divider position of the splitted window parts.