Avoiding duplicate keywords: problem following the FAQ instructions

Started by rsjaffe, September 04, 2010, 02:38:06 AM

Previous topic - Next topic

rsjaffe

The FAQ states:
QuoteTo prevent duplication when adding new values, specific values can be deleted then added back again in the same command. For example, the following command adds the keywords "one" and "two", ensuring that they are not duplicated if they already existed in the keywords of an image:
exiftool -keywords-=one -keywords+=one -keywords-=two -keywords+=two DIR
but, when I run "\Program Files (x86)\ExifTool\exiftool.exe"  -if "$MakerNotes:ImageStabilization eq 'Off'" . -v -IPTC:Keywords-="Image Stabilization Off" -IPTC:Keywords+="Image Stabilization Off", The keyword isn't added. If I run the same command without the initial 'remove' part, the keyword does get added. Is there something I'm missing here?

Thanks

Phil Harvey

The only thing I can think of is that you're running a very old version of exiftool, because this should work with any recent version.  The current version is 8.29.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

rsjaffe

I have 8.29. After bouncing between exiftool, Adobe Bridge CS5, and exiftoolgui, I found the problem to be that IPTC:Keywords causes the problem (and has conflicts between Bridge and exiftool, while Keywords does not.

"\Program Files (x86)\ExifTool\exiftool.exe"  -if "$MakerNotes:ImageStabilization eq 'Off'" . -v -Keywords-="Image Stabilization Off" -Keywords+="Image Stabilization Off" works

"\Program Files (x86)\ExifTool\exiftool.exe"  -if "$MakerNotes:ImageStabilization eq 'Off'" . -v -IPTC:Keywords-="Image Stabilization Off" -IPTC:Keywords+="Image Stabilization Off" does not



Why would IPTC:Keywords and Keywords act differently? Is it Bridge, exiftool or ?

Phil Harvey

I have been recommending that people write the MWG tags (ie. MWG:Keywords) for maximum compatibility with other applications.  The problem is that other software must decide what metadata to use if different types exist, and for a long time now the Adobe products have preferred XMP over IPTC.  Writing the MWG tags ensures that the EXIF, IPTC and XMP metadata remains synchronized.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

rsjaffe

Perhaps you should note in their respective listings (e.g., EXIF:Keywords) that MWG is preferred for best interoperability with various applications. I had no idea.

Phil Harvey

Yes.  This problem has been turning up more frequently recently.  I will see what I can do to add this to the documentation.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).