Possibility to exclude a field in ExifTool

Started by klipfisk, January 08, 2023, 06:12:43 AM

Previous topic - Next topic

klipfisk

Hi, I use a program called Graphic Converter (for the Mac), and they have a function for deleting exif data which I have always used. I can see that your application is much more thorough, however.  There is only one thing. There is also a comment field where I write a little blerb about free use of the picture, except for Wikipedia (if you need to ask why, search on the dark side of Wikipedia and J. Wales).

Anyhow, the question is, is there a way to clean an exif, while specifying a single field that should not be touched?

Thanks, great product. Heard about it from ReclaimTheNet.org

Phil Harvey

Generally, the way to do this is to add back the tag you want to keep, like this:

exiftool -all= -tagsfromfile @ -TAG_YOU_WANT_TO_KEEP FILE

- Phil
...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 ($).

wywh

[ninja'd by Phil but here goes anyway] Graphic Converter's remove all metadata does the same as -All= except for some reason it leaves JFIF tags intact.

Try something like (-All= removes everything but the -TagsFromFile option copies the desired tag back in):

exiftool -overwrite_original -All= -TagsFromFile @ -XMP-xmpRights:UsageTerms .
- Matti

StarGeek

You mention using the Comment tag.  If by this you mean the jpeg specific Comment, then you should know that tag is fragile and could be overwritten by some programs.  For example, Adobe programs used to overwrite it, though I'm not sure about current versions.

@wywh lists the tag you should be writing to, XMP-xmpRights:UsageTerms.

Example
exiftool -XMP-xmpRights:UsageTerms="my usage rights" /path/to/files/
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).