adding suffix to filenames (before the extension)

Started by athans, June 15, 2022, 09:30:24 AM

Previous topic - Next topic

athans


Hello

I'd like to add a suffix, say _xxx to each filename, before the extension. But somehow I have not figured out the proper syntax.
I ended up using a silly and inefficient solution of using an empty tag:

exiftool '-testname<%f_xxx$usercomment.%e'  .

but this does not sound right, and any attempt to just use the string _xxx in the expression failed.
Understanding I'm missing the obvious, I'd appreciate some help on this.
Thanks

StarGeek

This is Common Mistake #5c, though the mistake is usually the other way around.

Use the Greater/Less than signs </> for copying tags.

Use the equal sign = when you're setting a static string.

exiftool '-testname=%f_xxx.%e'  .
* 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).

athans

excellent. Obvious in retrospect.
Will brush up on common mistakes!