Write to xmp only for raw files

Started by foonji, March 16, 2019, 06:01:15 AM

Previous topic - Next topic

foonji

Hi all,

I have a script (in progress) to mass keyword an archive of images, all works as I want with jpegs/tiff with embedded data

However with my raw files I have xmp sidecars carrying the data, is there a way I can incorporate into the same command that I'm using (below) to write to xmp only for raw images only? or shall I have the code identify raw files to run a different command specifically for them?

exiftool -iptc:keywords='Keywords' -XMP-dc:subject='Keywords' -P -overwrite_original

Thanks

Phil Harvey

If there are only XMP files for the RAW files, then just run your command and the XMP files will be updated.

But if there are other XMP files that you don't want to update, then this will update only the ones that have a corresponding RAW file:

exiftool -XMP-dc:subject='Keywords' -P -overwrite_original -srcfile %d%f.xmp -ext RAW DIR

where RAW is the extension of your RAW files.

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

foonji

Thanks for the help Phil! Playing around with it at the moment, hopefully all goes well :)