Apply default.xmp to all RAW images in the folder.

Started by JobWellDone, May 10, 2023, 07:56:10 AM

Previous topic - Next topic

JobWellDone

I have folder with files

default.xmp
_DSC0001.ARW
_DSC0002.ARW
_DSC0003.ARW


What i want to get is three new XMP files that have with same contents as default.xmp with name of each image in the folder.

default.xmp
_DSC0001.ARW
_DSC0001.xmp
_DSC0002.ARW
_DSC0002.xmp
_DSC0003.ARW
_DSC0003.xmp


StarGeek

This would be Example #13 on the Metadata Sidecar Files page except instead of using -TagsFromFile @ you would hardcode it to your default file, -TagsFromFile /path/to/default.xmp.

You would set the -ext (-extension) option to the type of file you want to process, e.g. -ext ARW, or if you want to included all files, you would use --ext xmp to avoid processing any existing xmp files.

exiftool -ext ARW -TagsFromFile /path/to/default.xmp -srcfile %d%f.xmp -r DIR
* 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).

JobWellDone

Thanks a lot for this response, works great.

Quote from: StarGeek on May 10, 2023, 11:20:49 AMyou would use --ext xmp to avoid processing any existing xmp files.
However using --ext xmp, ExifTool still updates existing .xmp files.

StarGeek

Yes, because you are explicitly writing to the XMP sidecar files.  It will avoid copying the XMP files back onto themselves.  For example, when it reads _DSC0001.ARW, it will copy from the default into _DSC0001.xmp.  Without --ext xmp, it will then read _DSC0001.xmp and copy the data directly back into _DSC0001.xmp.

If you only want to create new XMP sidecar files, look at example #11.
* 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).