Hello,
I am trying to add IPTC:caption_abstract to existing IPTC:Keywords
I tried several options. I guess I have a confusion with some {} and ''
Initial values of the image
exiftool IMG_2631.JPG -s -G -keywords -caption-abstract
output
[IPTC] Keywords : John, Marie
[IPTC] Caption-Abstract : Zoo
Option 1:
exiftool IMG_2631.JPG -s -G -keywords+=${caption-abstract}
output
1 image files updated
exiftool IMG_2631.JPG -s -G -keywords -caption-abstract
output
[IPTC] Keywords : John, Marie, abstract
[IPTC] Caption-Abstract : Zoo
Option 2 and 3:
exiftool IMG_2631.JPG -keywords+=${iptc:caption-abstract}
exiftool IMG_2631.JPG -iptc:keywords=${'iptc:Caption-Abstract'}
output
zsh: unrecognized modifier
Option 4:
exiftool IMG_2631.JPG -iptc:keywords='${iptc:Caption-Abstract}'
Made the following changes
[IPTC] Keywords : ${iptc:Caption-Abstract}
[IPTC] Caption-Abstract : Zoo
I tried several others but no success.
Any idea what I am missing?
thank you
Alexandre
I am on Mac
Try this:
exiftool -a -G1 -s -Keywords -Caption-Abstract a.jpg
[IPTC] Keywords : John, Marie
[IPTC] Caption-Abstract : Zoo
exiftool -overwrite_original '-Keywords+<Caption-Abstract' a.jpg
1 image files updated
exiftool -a -G1 -s -Keywords -Caption-Abstract a.jpg
[IPTC] Keywords : John, Marie, Zoo
[IPTC] Caption-Abstract : Zoo
- Matti
This is Common Mistake #5c (https://exiftool.org/mistakes.html#M5).
QuoteUsing "=" instead of "<" to copy a tag, or using "<" instead of "=" to assign a value.
"<" is used for copying, in which case the source (right-hand-side) operand is interpreted as either
a tag name (if the operand does not contain a "$" symbol), or
a string containing tag names prefixed by "$" symbols (if the operand contains a "$" symbol).
"=" is used to assign a simple tag value, and the source operand is a string that is written directly to the destination tag.
(And the combination "<=" is used to assign a tag value from the contents of a file.)
See also FAQ #17, List-type tags (https://exiftool.org/faq.html#Q17)
thank you for the responses.
to wywh : it works! thanks
to
StarGeek. I learned more than I asked. Thank you for that. your 2 references are helping me for the future uses of exiftool.
Have a great day/evening