Script for renaming photos

Wall with painted stones

Wall with painted stones

I manage my image files manually and like them named in a particular way. Each image is named using its capture date and description. I write a description for every photo I keep so I can easily see and find things using just my Mac’s Finder.

The above image is captioned “Wall with painted stones” and was taken on August 29th, 2015 so its filename should be “20150829_Wall with painted stones.jpg”. I use Photo Mechanic to ingest, name, tag, and file my photos but it will not allow renames to use the Description IPTC field. I was told that was because it’s too easy to create files with invalid characters. On the other hand, Lightroom handles this fine, but I’m trying to wean myself from Lightroom so I had to come up with something else.

I used the wonderful [exiftool][2] to create the following one-liner and it works perfectly…

exiftool '-FileName<${CreateDate}_$Description.jpg' -d %Y%m%d%%-c -ext jpg .