Copy XMP:regionpersondisplayname to IPTC:keywords ?

Started by bobwolfeumich, March 24, 2013, 04:03:36 PM

Previous topic - Next topic

bobwolfeumich

I have many files with lists of names in XMP:regionpersondisplayname. Is there a way to copy this list of names  to IPTC:keywords? Ideally, I would like to merge the two lists  with
"-IPTC:Keywords +< XMP:regionpersondisplayname"
and then remove duplicates, but I don't know how to remove duplicates.

I don't have any other keywords, so the following works for me:
-iptc:keywords= "-IPTC:Keywords +< XMP:regionpersondisplayname"  -iptc:keywords

I was looking for a general solution that removes duplicate entries in a list of keywords delimited by "*". Or a better solution.

Phil Harvey

The technique for preventing duplicates entries in lists is explained in FAQ 17.  But to summarize, this is what you want:

exiftool "-IPTC:Keywords-<XMP:regionpersondisplayname" "-IPTC:Keywords+<XMP:regionpersondisplayname" ...

Sort of makes sense when you think about it, right? :)

- 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 ($).

bobwolfeumich

Very nice... Remove the duplicates before you copy them.