Copy Exif Data From One Field To Another In Same File

Started by herba, December 27, 2022, 04:30:17 PM

Previous topic - Next topic

herba

Greetings folks, somewhat new to ExifTool (~6 months) and have run into a need I simply can't figure out a solve for. Have come close in some early posts from others, but just can't get it, so hoping someone can help a newbie out.

I have a file (say d:\picture\image.jpg) and it has Exif data in  "REGION NAME"
I would like to copy this data into another Exif field in the same file called PERSON SHOWN IN IMAGE"

Any suggestions on how to do this?

Bonus question if I can: Reason for my ask is I have about 100k photos I have managed in Picasa (now a dead product) that have been facially tagged (into the REGION NAME field, Picasa's go-to for name placement it seems). I'm looking to make this face information available in any other tool I move to, and seems like the PERSON SHOWN IN IMAGE is one place to go (I have also seen some posts suggesting COMMENTS is the go-to, but dunno). Any advice here would be super appreciated as well as I put a lot of time into the tagging and would hate to have to redo.
HerbA

StarGeek

First a clarification, those tags aren't EXIF, they are XMP.  All EXIF data is Metadata, but not all Metadata is EXIF data.

The basic command for copying from one tag into another in the same file is
exiftool "-TARGETTAG<SOURCETAG" /path/to/files/

But you have to figure out the actual tag names.  What you are listing is the tag descriptions.  This is FAQ #2 and FAQ #3.

In this case, the tag names are the same as the descriptions but without the spaces.  So you want to copy from RegionName into PersonInImage.

But there is something to watch out for.  PersonInImage is a list type tag.  That means, even though exiftool will display the tag as a comma separated list, each item in the list is completely separate from the others.  Also, if there are already previous names in the PersonInImage tag, you have to decide if you want to keep them or overwrite them.

If you want to overwrite any previous data, then your command would be
exiftool "-PersonInImage<RegionName" /path/to/files/

If you want to add to the list, you would use
exiftool "-PersonInImage+<RegionName" /path/to/files/

The latter does not check for duplicates, so if the same name is added twice, it will show up twice in the tag.

See FAQ #17 for more details on list type tags.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

herba

Wow, thank you for (1) such a super-fast reply (I was going to check back in a few days to see if I got lucky) and (2) such a thorough explanation of multiple considerations.

Will have to think through this well before I do anything, then do some sample testing before stepping into it.

Thank you again for the details, have my homework ahead of me, but that's what makes photography fun: you're always learning!
HerbA