Shortest way to keep selected exif-tags only?

Started by Beholder3, October 24, 2011, 02:09:36 AM

Previous topic - Next topic

Beholder3

Hi,

is there a recommended shortest way to remove all metadata from a picture file with few specified exceptions in diffrent tag types, e.g. keep only exif:focallength and XMP:Rights but delete absolutely everything else?

Phil Harvey

Yes.  You delete everything then copy back the tags you want to keep:

exiftool -all= -tagsfromfile @ -exif:focallength -xmp:rights 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 ($).

Beholder3

Cool. Thanks. I little indirect approach.

Would that also work with a foldername as "FILE"? (I am not at my computer today so I can't test it).

Phil Harvey

Quote from: Beholder3 on October 24, 2011, 01:37:26 PM
Would that also work with a foldername as "FILE"? (I am not at my computer today so I can't test it).

Yes.

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

Beholder3

Hi,

I currently used -all= -tagsfromfile @ -exif:focallength -exif:iso -exif:exposuretime - FNumber -xmp:rights via GUI v5 on a DNG file.

I thought this would delete everything and only keep those 5 tags. But not so. The whole IFD0 is still there with make, model, artist, image description etc. A bunch of data in SubIFD and SubIFD1 are also still there.

Is there another way to really only keep the listed (in this exmaple five) tags and no others?


Phil Harvey

Please let me know if you have any questions after reading FAQ number 7.

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