I have been sorting my family photos, including some from a recovered backup drive my dad had. many of the photos were named file000268.jpg etc so I looked into renaming utilities, and ended up going with exiftool because I can use it in the shell and write scripts based around it (I use Mac and Ubuntu). I have a simple script working that renames photos to the date taken and it works great, but I am trying to add the camera make/model in front of the date, this will easily help me identify my dad's photos vs. photos from his graphic design clients(I know my parents had a kodak camera).
Here is the working script to rename photos with the date taken:
exiftool '-FileName<DateTimeOriginal' -d "%Y-%m-%d %H.%M.%S%%-c.%%e" /directory/
this results in photos named like this:
'2002-12-16 14.20.56.jpg'
I just want to add the camera make/model in front of the year ex:
'SONY CYBERSHOT 2002-12-16 14.20.56.jpg'
Thanks in advance for any help, I have been doing a ton of googling on this and have been pretty confused.
From the exiftool v9.69 manpage:
exiftool '-filename<%f_${model;}.%e' dir
Rename all files in "dir" by adding the camera model name to the file name. The semicolon after the tag name inside the braces causes characters which are invalid in Windows file names to be deleted from the tag value (see the -p option documentation for an explanation).
In your case you can just run exiftool
a second time after your initial rename:
exiftool '-filename<${model;} %f.%e' /directory/
Or all in one:
exiftool '-filename<${model;} ${datetimeoriginal}' -d "%Y-%m-%d %H.%M.%S%%-c.%%e" /directory/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With