ExifTool Forum

ExifTool => ExifTool GUI => Topic started by: Hugh on November 23, 2021, 01:50:12 PM

Title: How to delete XMP-microsoft metadata
Post by: Hugh on November 23, 2021, 01:50:12 PM
I have a jpg file that includes the following in the metadata:
    <rdf:Description rdf:about="" xmlns:MicrosoftPhoto="http://ns.microsoft.com/photo/1.0/" MicrosoftPhoto:Rating="50">
      <MicrosoftPhoto:LastKeywordXMP>
        <rdf:Bag>
          <rdf:li>Places/France/North/Campagne-les-Hesdin</rdf:li>
        </rdf:Bag>
      </MicrosoftPhoto:LastKeywordXMP>
      <MicrosoftPhoto:LastKeywordIPTC>
        <rdf:Bag>
          <rdf:li>Places/France/North/Campagne-les-Hesdin</rdf:li>
        </rdf:Bag>
      </MicrosoftPhoto:LastKeywordIPTC>
    </rdf:Description>
    <rdf:Description rdf:about="" xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/"/>

ExifToolGUI shows (within the Metadata>Xmp pane):
---- XMP-Microsoft ----
RatingPercent 0
RatingPercent 1
LastKeywordXMP Places/France/North/Regniere-Ecluse
LastKeywordIPTC Places/France/North/Regniere-Ecluse

I would like to remove this metadata. However, when I go to Modify>Remove metadata and tick the box for -Xmp-Microsoft then click Execute the program responds with:
Nothing changed in IMG_2416.JPG
    0 image files updated
    1 image files unchanged
Warning: [minor] Fixed incorrect URI for xmlns:MicrosoftPhoto - IMG_2416.JPG
<-END-


Is it possible to delete this metadata using ExifToolGUI? If not, what command line command should execute?
Title: Re: How to delete XMP-microsoft metadata
Post by: Phil Harvey on November 23, 2021, 02:00:20 PM
You should be able to do it using this in the ExifTool Direct box: -xmp-microsoft:all=

- Phil
Title: Re: How to delete XMP-microsoft metadata
Post by: Hugh on November 23, 2021, 03:05:11 PM
Thanks, Phil. Unfortunately after executing that command nothing changed and ExifTool LOG reported exactly the same message as before.

In case they help I attach 2 jpg files, both of which have been tagged with keyword labels and rated (and possibly edited in Photoshop) and resized in ImageResizer in the same way. My problem is that for IMG_2416 the labels (keywords or tags) are not seen either by Windows File Explorer or the F-Stop Android app, whereas for IMG_2414 the labels appear in File Explorer and the app in the usual way. So far as I can see the differences between the metadata between the two files that may be relevant are
- the presence in IMG_2416 of the MicrosoftPhoto:LastKeywordXMP and MicrosoftPhoto:LastKeywordIPTC tags
- the presence in IMG_2416 of two different MicrosoftPhoto:Rating tags (0 and 1) where IMG_2414 has one rating of 50.
Title: Re: How to delete XMP-microsoft metadata
Post by: StarGeek on November 23, 2021, 03:10:04 PM
The XMP in the problem one appears to be badly formed

Try adding the -m (-ignoreMinorErrors) option (https://exiftool.org/exiftool_pod.html#m--ignoreMinorErrors) in the direct box (or I think there's a menu option)
-xmp-microsoft:all= -m
Title: Re: How to delete XMP-microsoft metadata
Post by: Hugh on November 23, 2021, 03:42:05 PM
Thanks, Phil. That has worked in removing the Microsoft tags. Sadly, I'm still not seeing the keywords in File Explorer. So I must see if I can work out what else is causing the problem.

Thanks again for your help.
Title: Re: How to delete XMP-microsoft metadata
Post by: Hugh on November 23, 2021, 03:47:52 PM
Sorry. It has achieved what I wanted. I removed the unwanted tags from a copy of the jpg file and checked the original to see if it worked. Silly me!
Title: Re: How to delete XMP-microsoft metadata
Post by: Hugh on November 23, 2021, 03:51:32 PM
I've realised that quite a lot of my photos have keywords that are not recognised by Windows File Explorer. I'm assuming for the moment that that is because they have acquired the unwanted Microsoft tags. If I apply the ExifTool command to all the photos in a folder will it matter is many of the photos don't have those tags .... will ExifTool simply skip over those files?
Title: Re: How to delete XMP-microsoft metadata
Post by: StarGeek on November 23, 2021, 05:57:42 PM
If the tag that you're removing doesn't exist, then exiftool will not edit the file.
Title: Re: How to delete XMP-microsoft metadata
Post by: Hugh on November 24, 2021, 04:34:15 PM
Thanks, StarGeek. (I see I thanked Phil instead of you in an earlier post. Sorry.)