ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: trymeout on May 06, 2021, 02:35:03 PM

Title: Delete all XMP tags except people & face tags
Post by: trymeout on May 06, 2021, 02:35:03 PM
Is there a way to delete all of the XMP data of a JPG without deleting the people tags and face tags of a file that was added with digikam?

This command will delete all the xmp data but is there a way to exempt face tags and people tags?

exiftool -overwrite_original -xmp:all= .

Thank you all for your help, this forum as been helpful and has generous people willing to lend a hand
Title: Re: Delete all XMP tags except people & face tags
Post by: StarGeek on May 06, 2021, 02:40:48 PM
See the last sentence under the --TAG option (https://exiftool.org/exiftool_pod.html#TAG1).  You copy the tags you want to keep back into the file with -TagsFromFile @
Title: Re: Delete all XMP tags except people & face tags
Post by: trymeout on May 06, 2021, 02:53:10 PM
I tried these commands, the first done did not seem to do anything and the second command cannot find 'Keywords' command

exiftool -overwrite_original -TagsFromFile @ -xmp:all= .
exiftool -overwrite_original -TagsFromFile Keywords -xmp:all= .

I added the image in the attachment that I would like to learn how to remove all xmp date from but keep the face and people tags.
Title: Re: Delete all XMP tags except people & face tags
Post by: StarGeek on May 06, 2021, 05:40:40 PM
The line I pointed to from the docs (emphasis mine)
QuoteInstead, individual tags may be recovered using the -tagsFromFile option (eg. -all= -tagsfromfile @ -artist).

So clear, then -TagsFromFile @

It looks like digikam is saving the faces in the MWG regions, so
exiftool -P -overwrite_original -xmp:all= -TagsFromFile @ -XMP-mwg-rs:all /path/to/files/