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, conceptually, 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?


1 Answer 1


An extension of the redirection feature allows strings involving tag names to be used on the right hand side of the < symbol with the syntax "'-DSTTAG<STR'", where tag names in STR are prefixed with a $ symbol.


So, the only problem with your command is the = symbol which should be <.

It should also be properly screened for your terminal, for bash it's:

exiftool '-mwg:description<Text to Prepend $mwg:description' DSC00096.jpeg


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.