ExifTool Forum

General => Metadata => Topic started by: jimh on November 13, 2020, 05:03:51 PM

Title: How can I remove XMP from JPGs?
Post by: jimh on November 13, 2020, 05:03:51 PM
Many of my photo JPGs contain XMP keywords, titles and descriptions embedded by some Adobe application in the past.  I now use IPTC because (ironically) it's universally recognized.   The XMP metadata is obsolete and is causing a problem when I upload to some sites, which use it in preference to the IPTC.

I need a way to remove all this XMP data from hundreds of photos.

Can I do this with a command-line invocation of ExifTool?
Title: Re: How can I remove XMP from JPGs?
Post by: StarGeek on November 13, 2020, 05:20:24 PM
You can remove xmp data with
exiftool -XMP:All= /path/to/files

This command creates backup files.  Add -Overwrite_Original (https://exiftool.org/exiftool_pod.html#overwrite_original) to suppress the creation of backup files.  Add -r (https://exiftool.org/exiftool_pod.html#r-.--recurse) to recurse into subdirectories.
Title: Re: How can I remove XMP from JPGs?
Post by: jimh on November 13, 2020, 05:50:12 PM
Thanks StarGeek, that sounds promising.

Title: Re: How can I remove XMP from JPGs?
Post by: jimh on November 13, 2020, 09:29:30 PM
If I try this...
exiftool -r -Overwrite_Original -XMP:All= *.jpg
   
... it removes the XMP, and doesn't create a backup copy, but subdirectories are ignored. 


I have a 'photos' folder containing a set of subfolders, each of which contains JPGs.  Let's say I have a command prompt at D:\photos.     What's the exiftool syntax to modify all the JPGs in all the subfolders? 


Title: Re: How can I remove XMP from JPGs?
Post by: StarGeek on November 13, 2020, 10:07:54 PM
See the docs on the -r (-recurse) option (https://exiftool.org/exiftool_pod.html#r-.--recurse) and Common Mistake #2 (https://exiftool.org/mistakes.html#M2).
   Recursively process files in subdirectories. Only meaningful if FILE is a directory name.

Instead of *.jpg, use the -ext (extension) option (https://exiftool.org/exiftool_pod.html#ext-EXT---ext-EXT--extension).
exiftool -r -ext jpg -XMP:all= /path/to/top/dir/
Title: Re: How can I remove XMP from JPGs?
Post by: jimh on November 14, 2020, 10:02:52 AM
Thanks, will try that shortly.