Wednesday, October 20, 2010

Batch rename your pictures to include shot date

It is a good practice to rename your pictures and include the date/time the picture was taken in the name.
You can use jhead to get the date/time info from the EXIF header and rename the pictures.

The following command will rename all the JPG files in the current folder(not recursively) using the EXIF info. After the operation the filenames will look like this YYYY_MM_DD_ORIGINALFILENAME.jpg

jhead -exonly -n%Y_%m_%d_%f *.jpg


You can visit the homepage for more info on jhead