[Originally posted by heiko on 2007-12-04 16:17:44-08]
Hello,
I like to add a keyword only if this keyword does not exists. I've tried the following:
exiftool "-Keywords+=hugo" -if "not $Keywords=~/hugo/" *.jpg
but I always get the message "x files failed condition". Can you say me whats wrong with this condition?
Heiko
[Originally posted by exiftool on 2007-12-04 16:31:08-08]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
[Originally posted by heiko on 2007-12-04 16:41:02-08]
oh, sorry Phil,
all my tests with hugo. hugo was already in the keywords. Your are right, it works ..
Heiko