Copying XMP block between images with slightly different names

Started by amlobat2, May 02, 2021, 06:31:29 PM

Previous topic - Next topic

amlobat2

Hello all :) I recently started using exiftool to copy the XMP data from my original set of images to an edited set. The images in the original file and in the edited file have identical names, however the images in the edited file have an added identifier:

original/IMG_01.jpg to edited/IMG_01_1.jpg

This is what I attempted to copy the XMP data:

exiftool -tagsFromFile original\%f.jpg -xmp edited\%f_1.jpg


but I get this error:

Warning: Error opening file - original\%f_1.jpg
Error: File not found - edited/%f_1.jpg
    0 image files updated
    1 files weren't updated due to errors


I'd appreciate if someone can help me with the correct syntax! TIA  ;D

StarGeek

The %f can't be used as part of the name of the files you want to process.  What you'll need to do is remove two characters from the end of the %f value when used after the -TagsFromFile option.  You'll find the docs on how to edit the % tokens values in the Advanced features section under the -w (-TextOut) option.

Try this
exiftool -ext jpg -tagsFromFile original\%-.2f.jpg -xmp edited\
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype