ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: mickeh on February 28, 2012, 07:48:31 AM

Title: Copy XMP data to EXIF?
Post by: mickeh on February 28, 2012, 07:48:31 AM
I have recently tagged all my pictures (~5000) with persons in Windows Live Gallery. The tag that holds the name is an XMP tag called RegionPersonDisplay.
Now I use Lightroom 3 and can't search for any names because Lightroom don't search in the RegionPersonDisplay tag.

My hope is now that ExifTool can, by a batch operation, copy all names in RegionPersonDisplay for each photo in every catalogue to EXIF's tag XPKeywords so I can search for persons name in Lightroom. Does anyone know how I do that?

//Micke
Title: Re: Copy XMP data to EXIF?
Post by: Phil Harvey on February 28, 2012, 01:00:49 PM
Hi Micke,

This command may do what you want:

exiftool "-xpkeywords<regionpersondisplayname" DIR

In this command, DIR is the name of the directory containing the images.

Add -r to the command to also process sub-directories.

The -sep option may be used to change the separator between keywords.  The default separator is comma+space.

- Phil
Title: Re: Copy XMP data to EXIF?
Post by: BogdanH on February 28, 2012, 02:46:43 PM
Hi Phil,

I saw Micke's post before and was hoping I could help with answer. However, no matter what I've tried, I couldn't copy value from RegionPersonDisplayName to any other tag. Btw. value is one single word, created with ExifTool:
exiftool -RegionPersonDisplayName=MyName MyFile.jpg
The result from ExifTool was always "Warning: No writable tags set from MyFile.jpg".. "0 image files updated" -so I waited for you.

Now, example you gave above doesn't work here either: I get the same result from ExifTool. What am I doing wrong?

Bogdan
Title: Re: Copy XMP data to EXIF?
Post by: Phil Harvey on February 28, 2012, 10:45:50 PM
Oh, sorry.  I forgot this was a flattened tag.  You must add the --struct option to make this work.

See the Copying structures (https://exiftool.org/struct.html#Copying) documentation.

- Phil
Title: Re: Copy XMP data to EXIF?
Post by: mickeh on February 29, 2012, 05:44:06 AM
Really great! So in my test catalogue I did following: exiftool -sep ; --struct -overwrite_original -r "-xpkeywords<regionpersondisplayname" "C:\Users\mikaeha\Downloads\Exif test"
This worked out fine, thank you very much for your help! 8)
Title: Re: Copy XMP data to EXIF?
Post by: Phil Harvey on March 13, 2012, 08:23:57 AM
Update:  As of ExifTool 8.83, you no longer need to use the --struct option to copy flattened tags by name.

- Phil