ExifTool Forum

ExifTool => Newbies => Topic started by: da1k on October 18, 2021, 03:00:39 PM

Title: JPG: remove all metadata except IFD0 + original date and time
Post by: da1k on October 18, 2021, 03:00:39 PM
Hello,

How can I remove from JPG files all metadata except IFD0 part (orientation, author, subject etc) and DateTimeOrginal and CreateDate from ExifIFD section?
Title: Re: JPG: remove all metadata except IFD0 + original date and time
Post by: StarGeek on October 18, 2021, 03:13:16 PM
Try
exiftool -ext jpg -all= -TagsFromFile @ -IFD0:all -DateTimeOriginal -CreateDate /path/to/files/

Edit: Fixed typo
Title: Re: JPG: remove all metadata except IFD0 + original date and time
Post by: da1k on October 18, 2021, 03:20:17 PM
It's almost perfect. It keeps original date and time but removes subject and author which I wish to have. Rest metadata is gone :)

EDIT: I found how to do it :)

exiftool -ext jpg -all= -TagsFromFile @ -IDF0:all -XPSubject -XPAuthor -Copyright -Artist -DateTimeOriginal -CreateDate -ColorSpace /path/to/files/
do the job :)

@StarGeek thank you very much for help :)

best regards,
da1k
Title: Re: JPG: remove all metadata except IFD0 + original date and time
Post by: StarGeek on October 18, 2021, 04:48:52 PM
Ooops, typo on my part.  Change
-IDF0:all
into
-IFD0:all

Of course, you can always copy individual tags as you found out.