Avoiding duplicate keywords (and other list-type tags)?

Started by Archive, May 12, 2010, 08:54:39 AM

Previous topic - Next topic

Archive

[Originally posted by rogerhoward on 2009-08-09 17:58:20-07]

I've recently noticed that the default behavior when adding values to a list-type tag such as Subject or Keywords is to add it, even if it results in a duplicate value. Obviously, I could add logic to read the value of the tag first and only add if the value isn't already present, but before I do this I'm wondering if there's a built-in way of adding values but suppressing duplicates.

For instance, running these commands one after the other:

Code:
exiftool -Subject+="Test" image.jpg
exiftool -Subject+="Test" image.jpg

Results in image.jpg having duplicate keywords "Test" in the Subject field. Is there a switch to change this behavior, or do I need to build it into my process?

-rogerhoward

Archive

[Originally posted by exiftool on 2009-08-11 11:31:39-07]

Hi Roger,

This question is addressed in the 3rd last example of
FAQ 17.

- Phil

Archive

[Originally posted by rogerhoward on 2009-08-14 14:23:01-07]

Thanks Phil - I misunderstood that section until you pointed it out; went back and re-read and applied, works like a charm. Thanks!