Add Missing Filename Extension

Started by Stephen Marsh, September 15, 2017, 09:05:08 AM

Previous topic - Next topic

Stephen Marsh

Is it possible to use metadata to add in a missing filename extension?

The following does not work, probably because the arguments and syntax is all wrong:

exiftool -ext '*' -if '$FileType=JPEG' -filename='%%f.jpg' 'DIR'

The idea being that there may be FileType=JPEG or FileType=TIFF etc. Hoping to get one to work, before looking into multiples.

StarGeek

You're using a numeric comparison = instead of a string comparison eq.

But Phil added a simpler solution a couple years ago.

exiftool -ext * "-filename<%f.$fileTypeExtension" DIR

"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Stephen Marsh