Restoring filenames to recovered files using File Number tag

Started by keanon, March 13, 2023, 12:37:39 PM

Previous topic - Next topic

keanon

Hello, I'm looking for a way to batch rename a large number of files to img_#### where the #### is the last 4 digits of the File Number EXIF tag.

Does anyone have experience with this and maybe have a script on hand?

Thanks.

Phil Harvey

Maybe something like this:

exiftool "-filename<img_${filenumber;$_=sprintf('.4d',$_ % 10000)}" DIR

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).