Use string prefix while batch tagging

Started by anithegregorian, April 14, 2014, 05:54:21 AM

Previous topic - Next topic

anithegregorian

Hi,

I'm trying to set EXIF imagedescription tag by using image filename without extension. So far this works:

exiftool "-exif:imagedescription<basename" -r -ext .jpg * -overwrite_original

While this works perfectly well, can I add a string prefix to imagedescription. Something like:

MYIMAGE-FILENAME

So the imagedescription tag become PREFIX followed by FILENAME

Phil Harvey

Try this:

exiftool "-exif:imagedescription<MYIMAGE=$basename" -r -ext .jpg * -overwrite_original

The above double quotes are used in Windows.  Use single quotes instead if you are on Mac or Linux.

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