How can I use ExifTool to prepend text to image files' descriptions?

Started by sdm, July 29, 2023, 09:51:49 PM

Previous topic - Next topic

sdm



I need to prepend text to the description fields of a bunch of jpgs. I found discussions of appending text (e.g., here and here), but not of prepending text. My destination tag is mwg:description, and my understanding is that the current value of that tag is $mwg:description, so I think I'm looking for something like this:

exiftool -mwg:description="Text to Prepend $mwg:description" *.jpg

but that just replaces the current description with Text to Prepend; the existing description text is lost. Can someone help me with the proper incantation?

Phil Harvey

This is common mistake 5c.

Also, you need to use single quotes if you are on Mac or Linux (or Windows Powershell).

- 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 ($).