ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: Beholder3 on October 24, 2011, 02:09:36 AM

Title: Shortest way to keep selected exif-tags only?
Post by: Beholder3 on October 24, 2011, 02:09:36 AM
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?
Title: Re: Shortest way to keep selected exif-tags only?
Post by: Phil Harvey on October 24, 2011, 07:21:09 AM
Yes.  You delete everything then copy back the tags you want to keep:

exiftool -all= -tagsfromfile @ -exif:focallength -xmp:rights FILE

- Phil
Title: Re: Shortest way to keep selected exif-tags only?
Post by: Beholder3 on October 24, 2011, 01:37:26 PM
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).
Title: Re: Shortest way to keep selected exif-tags only?
Post by: Phil Harvey on October 24, 2011, 01:41:15 PM
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
Title: Re: Shortest way to keep selected exif-tags only?
Post by: Beholder3 on February 03, 2012, 06:22:11 AM
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?

Title: Re: Shortest way to keep selected exif-tags only?
Post by: Phil Harvey on February 03, 2012, 07:19:22 AM
Please let me know if you have any questions after reading FAQ number 7 (https://exiftool.org/faq.html#Q7).

- Phil