ExifTool Forum

General => Metadata => Topic started by: sevy on May 12, 2019, 08:14:34 AM

Title: add multiple keywords only if not already existing
Post by: sevy on May 12, 2019, 08:14:34 AM
Hello,

Exiftool : 11.41
OS : Win 10 64 - Home

I learned :
A :  how to add a keyword if not already existing :
exiftool -Keywords+="KW" -if "not $iptc:Keywords=~/KW/"

B : how to add multiple keywords in one operation :
exiftool -sep ", " -iptc:Keywords+="KW1, KW2, KW3"

but I have a question : is it possible to add multiple keywords only if not already existing ?
with others words : is it possible to combine A and B ?

thanks in advance

sevy
Title: Re: add multiple keywords only if not already existing
Post by: Phil Harvey on May 12, 2019, 08:32:44 AM
Hi Sevy,

Reading FAQ 17 (https://exiftool.org/faq.html#Q17) should answer all your questions.

- Phil
Title: Re: add multiple keywords only if not already existing
Post by: sevy on May 12, 2019, 09:52:08 AM
Hi Phil,

Shame on me, the answer was available...

I used
exiftool -sep ", " -iptc:Keywords-="kw1, kw2, kw3" -iptc:Keywords+="kw1, kw2, kw3"
and it works

Thanks a lot,

Sevy