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

* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Stephen Marsh