Friday, September 13, 2013

ExifTool and long-term storage of my digital photos

I store my archive of digital photos (currently 13,528 image files!) on an external USB hard disk. This is backed up to the web via a CrashPlan 3 subscription. I keep them organised in a directory structure derived from the date on which the photo was taken. So a picture I took today (13 Sept 2013) would be stored in the directory F:\PhotoArchive\2013\09\13. To achieve this I use ExifTool to read "Date taken" from the EXIF information from the image file and so to move the file to the appropriate directory.

ExifTool by Phil Harvey is a free Perl library that can read meta data from many image file formats. It is also available from his web-site as a Windows binary - and that is what I use.

The content of my batch file, photo.bat, is as follows (all on one line):

exiftool "-Directory<DateTimeOriginal" -d "F:/PhotoArchive/%%Y/%%m/%%d" -r "d:\temp"

My work flow is:
  1. Download image from the camera to some temporary directory - here I am using d:\temp,
  2. Go through them and delete the ones which are not worth keeping,
  3. Run the batch file photo.bat - this moves the remaining image files to their long-term storage location (and deletes them from d:\temp).
Note that, to make this work, either you need to run the batch file from the directory where exiftool.exe is installed or you need the path to exiftool in you PATH environment variable. I found it most convenient to create a shortcut to the batch file on my desktop. Double-clicking it in step 3 does the job.