Copy all tags from file but keeping some original values

Started by banana123, April 07, 2024, 07:56:58 AM

Previous topic - Next topic

banana123

Hi guys,
I'm trying to copy all tags from src.fpg to dst.jpg, but i want some values from the dst.jpg image to remain untouched.
I'm using the -tagsFromFile option.
I tried using the exclude option, but i guess its not its purpose..
For example, i want to keep the orientation flag untouched, and set the Make field to some random value.

Would like some help here..
thanks!!

StarGeek

It would help to see your exact command.

But I suspect you might need two -TagsFromFile option. One to copy the new data and then a second to copy the old data back in.  Also see Note #4 under that entry for the order of operations when copying tags and setting new values.

As an example, this copies all the EXIF data from the source file, but then copies the Orientation tag back in from the original file.
exiftool -TagsFromFile source.jpg -EXIF:All -TagsFromFile @ -Orientation target.jpg
* 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).

banana123

Quote from: StarGeek on April 07, 2024, 11:58:39 AMIt would help to see your exact command.

But I suspect you might need two -TagsFromFile option. One to copy the new data and then a second to copy the old data back in.  Also see Note #4 under that entry for the order of operations when copying tags and setting new values.

As an example, this copies all the EXIF data from the source file, but then copies the Orientation tag back in from the original file.
exiftool -TagsFromFile source.jpg -EXIF:All -TagsFromFile @ -Orientation target.jpg


thanks!
this is the command i used:

exiftool -tagsFromFile source.jpg -tagsFromFile dest.jpg -orientation -thumbnailImage dest.jpg
for some reason the JFIF remains the same, how can i "copy" all the APPs data?

Phil Harvey

Add -jfif:all to copy the JFIF information.  You can't copy all APP segments.  It is possible only to copy the writable ones.  See here for a list.

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