Append content of one tag to another

Started by SouthPoleCat, August 29, 2018, 04:37:48 PM

Previous topic - Next topic

SouthPoleCat

I honestly tried to read through the docs and examples, yet this seemingly simple operation does not work for me. In my image, I have a title and a caption and I know that the tags "xmp-dc:title" and "xmp-dc:description" exist with correct content and are writable. If I try to replace:

exiftool "-xmp-dc:title<xmp-dc:description" a.jpg

everything works fine. However, if I try to append my description to a title using:

exiftool "-xmp-dc:title+<xmp-dc:description" a.jpg

I get: "shift value for xmp-dc:title is not a number. I am pretty sure I am making a silly mistake somewhere, but can't see it.

StarGeek

The +< notation is for appending list type tags (XMP:Subject aka keywords) without overwriting them.  If you want to append one tag onto another, try this:
exiftool "-xmp-dc:title<$xmp-dc:title $xmp-dc:description" a.jpg

Here, we have to add the dollar sign to treat the tags as a string, adding a space inbetween.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

SouthPoleCat

Wow! That worked exactly as I wanted. Thank you so much for the help!