Main Menu

Recent posts

#71
Metadata / Should File:CurrentIPTCDigest ...
Last post by wywh - June 27, 2025, 12:59:36 AM
For a while I wondered why I could delete IPTCDigest but not CurrentIPTCDigest...

exiftool -a -G1 -s -Warning -CurrentIPTCDigest -IPTCDigest -Caption-Abstract image.jpg
[ExifTool]      Warning                         : IPTCDigest is not current. XMP may be out of sync
[File]          CurrentIPTCDigest               : 50da7dda60635498ad18dcb40a6198cd
[Photoshop]     IPTCDigest                      : 00000000000000000000000000000000
[IPTC]          Caption-Abstract                : Caption

exiftool -overwrite_original -IPTCDigest= image.jpg
    1 image files updated

exiftool -a -G1 -s -Warning -CurrentIPTCDigest -IPTCDigest -Caption-Abstract image.jpg
[File]          CurrentIPTCDigest               : 50da7dda60635498ad18dcb40a6198cd
[IPTC]          Caption-Abstract                : Caption

exiftool -overwrite_original -CurrentIPTCDigest= image.jpg
Warning: Sorry, CurrentIPTCDigest is not writable
Nothing to do.

...until I realized that "CurrentIPTCDigest is not embedded data. It is a hash created from the current IPTC data. So if you remove all IPTC tags, it is no longer created".

exiftool -overwrite_original -IPTC:All= image.jpg
    1 image files updated

exiftool -a -G1 -s -Warning -CurrentIPTCDigest -IPTCDigest -Caption-Abstract image.jpg

"The values of the composite tags are Derived From the values of other tags. These are convenience tags which are calculated after all other information is extracted."

-> Question: Should CurrentIPTCDigest then be listed in the Composite tags group?

- Matti
#72
Newbies / Re: Multiple tag deletions
Last post by StarGeek - June 26, 2025, 07:49:05 PM
Heh, I was debating on whether I should post my "Remove Doc History junk" command, typed up another paragraph, but then decided to delete it.

What the heck, I use this to delete the history/document stuff, but save the PreservedFileName tag

exiftool -P -overwrite_original -echo "Remove Doc History junk" -api "NoWarning+=No writable tags set from" -DocumentAncestors= -XMP-xmpMM:all= -TagsFromFile @ -PreservedFileName /path/to/files/
#73
Newbies / Re: Multiple tag deletions
Last post by Phil Harvey - June 26, 2025, 07:38:39 PM
Ha.  Beat you by 18 seconds.  ;)
#74
Newbies / Re: Multiple tag deletions
Last post by StarGeek - June 26, 2025, 07:37:39 PM
On Mac/Linux, options with asterisks need quotes, otherwise it looks for file that match that name

exiftool '-History*=' L1000161-2.jpg

Using -XMP-xmpMM:all= might also be an option for you, as the XMP-xmpMM group contains nothing but Media Management tags, which can bloat the file size by a lot. The one exception is PreservedFileName, which is usually used to hold the original filename before renaming.
#75
Newbies / Re: Multiple tag deletions
Last post by Phil Harvey - June 26, 2025, 07:37:21 PM
In all Unix shells you must protect the wildcards meant for ExifTool by quoting:

exiftool "-History*=" L1000161-2.jpg

StarGeek's command only works in Windows.

- Phil
#76
Newbies / Re: Multiple tag deletions
Last post by DPUK01 - June 26, 2025, 05:43:01 PM
Thank you, Stargeek. The wildcard option sounds useful but I tried it and didn't get it to work. I ran

exiftool -History*= L1000161-2.jpg
zsh: no matches found: -History*=

There are several tags starting with that name in the XMP-XMPmm section

Am I doing something wrong here?
#77
Newbies / Re: Multiple tag deletions
Last post by StarGeek - June 26, 2025, 04:18:39 PM
Quote from: DPUK01 on June 26, 2025, 04:02:43 PMHello. I want to
1. delete multiple tags in multiple jpg files located in the same folder. These are about 30 consecutive tags located in the XMP group and I don't want to delete the whole group.
...
I could then go to the next tag and repeat this but is there any quicker way of doing this (perhaps by specifying the tag index number range)

From the docs on the -TAG[+-^]=[VALUE] option
QuoteMany tag values may be assigned in a single command.

Deleting tags is simply a different type of assignment.

exiftool -TAG1= -TAG2= -TAG3= -TAG4= /path/to/files/

You can also use wildcards. For example, to remove all the GPS tags

exiftool -GPS*= /path/to/files/

You can mix individual tags and groups of tags

exiftool -TAG1= -TAG2= -TAG3= -TAG4= -GPS*= -XMP-xmpMM:all= /path/to/files/
#78
Newbies / Multiple tag deletions
Last post by DPUK01 - June 26, 2025, 04:02:43 PM
Hello. I want to
1. delete multiple tags in multiple jpg files located in the same folder. These are about 30 consecutive tags located in the XMP group and I don't want to delete the whole group. I could do this by first going the folder they are located in Terminal (I am using a Mac) and then use

Exiftool -[TAG]= -r *.jpg.

I could then go to the next tag and repeat this but is there any quicker way of doing this (perhaps by specifying the tag index number range)

2. I want to delete a group of tags in a different part of the metadata schema using

Exiftool -[group]:all= *.jpg

but add this to the above as a separate command to make a reusable set of commands

Any suggestions welcome
#79
Newbies / Re: Fille missing tag how to f...
Last post by StarGeek - June 25, 2025, 03:14:57 PM
If you need to take in the possibility of any of the tags not existing, then it really isn't feasible to do this on the command line. You would have to make an option for every possible combination of missing tag.

You can't use any of the options that fill in a default option, such as the -f (-ForcePrint) option and the -api MissingTagValue option, because that would also affect the CreateDate tag, meaning you would never fall back to the FileModifyDate.

The best, but more complex, solution would be to create a user defined tag that would build up the filename based upon the tags in the file.

Assumming that the files that have a CreateDate also have all of the other tags, the quick and dirty way would be to run one command for the files with CreateDate (add -if "$CreateDate") and one for those without (-if "not $CreateDate"), with the missing tags removed from the rename.
#80
Newbies / Re: Fille missing tag how to f...
Last post by unific - June 25, 2025, 12:17:05 PM
i was trying -api MissingTagValue= also did not work