JPG: remove all metadata except IFD0 + original date and time

Started by da1k, October 18, 2021, 03:00:39 PM

Previous topic - Next topic

da1k

Hello,

How can I remove from JPG files all metadata except IFD0 part (orientation, author, subject etc) and DateTimeOrginal and CreateDate from ExifIFD section?

StarGeek

Try
exiftool -ext jpg -all= -TagsFromFile @ -IFD0:all -DateTimeOriginal -CreateDate /path/to/files/

Edit: Fixed typo
* 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).

da1k

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

StarGeek

Ooops, typo on my part.  Change
-IDF0:all
into
-IFD0:all

Of course, you can always copy individual tags as you found out.
* 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).