Deleting two specific keywords

Started by warrencalvert, November 02, 2022, 06:08:48 AM

Previous topic - Next topic

warrencalvert

Hi
In the following section of xmp I need to delete both the DateRangeStart and DateRangeEnd

 <rdf:Description rdf:about=''
  xmlns:MY='http://ns.mylollc.com/MyloEdit/'>
  <MY:DateRangeScope/>
  <MY:DateRangeStart>2022-10-30T10:02:57.000</MY:DateRangeStart>
  <MY:DateRangeEnd>2022-10-30T10:02:57.000</MY:DateRangeEnd>
  <MY:MetadataDate>2022-11-02T09:40:30.552Z</MY:MetadataDate>
  <MY:Undated>false</MY:Undated>
  <MY:flag>false</MY:flag>
  <MY:processVersion>1</MY:processVersion>
 </rdf:Description>

I tried the command below for one file as a test but its not quite right, it doesnt work.

exiftool -all-="{DateRangeStart,DateRangeEnd}" dsc_9326.xmp

Please advise what I've done wrong.
Also, how would I modify this to process all xmp files in all folders recursively?
Would it just be a case of adding -r and *.xmp to the above?

Thanks,
Warren.

warrencalvert

Hi

Further to the above, I've also realised I need to remove these two keywords from all JPG, NEF and XMP files. 
Can I just use * to process everything?

Thanks,
Warren.

Phil Harvey

Hi Warren,

You will need to create user-defined tags to delete these nonstandard XMP tags.  See the example config file for examples on creating user-defined XMP tags.

Once you have done this, the command to do this recursively for all .xmp, .jpg and .nef files in a directory and its sub-directories is:

exiftool -daterangestart= -daterangeend= -ext xmp -ext jpg -ext nef -r DIR
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

I believe this post contains the config file needed to edit these tags.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

warrencalvert

Thanks, I've download the config file but no idea what changes to make to it.
Sorry - please could you help with how to define the new XMP tag?
Its really not clear from the config file which lines I need to add it to.

warrencalvert

sorry, I misread your post.  Didnt realise you'd linked to the actual config file I need.
That works perfectly, thanks for your help.

StarGeek

To clarify for anyone else coming upon this thread.

The config file is the first "CODE" section in that post.  Hit select and copy/paste the text into a file using something like notepad.  Save it to the same directory as exiftool with a name like Mylo.Config

The -Config option must be the first option to use the config file, so the command would look like
exiftool -config mylo.config -daterangestart= -daterangeend= -ext xmp -ext jpg -ext nef -r DIR
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype