Image-ExifTool - Re: Adding Keyword if it does not exist

Posted on Tue Dec 4 18:31:08 2007 by exiftool in response to 6616 (See the whole thread of 3)
Re: Adding Keyword if it does not exist
Hi Heiko,

What you have done should work in Windows. If you are in Unix, you would need to use single quotes instead.

I copied your exact command and it works fine for me here.

You can test your condition with an extract command. Try these:

exiftool -keywords -if "not $Keywords=~/hugo/" *.jpg exiftool -keywords -if "$Keywords=~/hugo/" *.jpg

The first command should print keywords for all files without "hugo" in the keywords, and the second should print all the keywords with "hugo".

- Phil
Direct Responses: 6618 | Write a response