I'd like to extract the PreviewImage from all .ARW files in a directory, save them as .JPG files and append the 'Description' from the source file's XMP file to the output filename.
Here's a non-working command that tries to express what I want to do:
exiftool -b -PreviewImage -w _${XMP:Description}.jpg -ext ARW .
So given the files photo1.ARW and photo1.XMP, when I run the command I would get the file photo1_MyPhotoDescription.jpg if "MyPhotoDescription" was the value of the Description field in the file photo1.XMP
Thoughts?
Thank you very much. I have been reading through the forums, checking out examples I can find, and haven't found anything quite like this. I'm sure it's very possible, I'm just having difficulty locating information about it.
You can't use tags as part of the name from the -w (-TextOut) option (https://exiftool.org/exiftool_pod.html#w-EXT-or-FMT--textOut). You'll have to run a second command using -TagsFromFile option (https://exiftool.org/exiftool_pod.html#tagsFromFile-SRCFILE-or-FMT) to copy the Description to the new files Filename.
So extract with
exiftool -b -PreviewImage -w %f.jpg -ext ARW .
Then rename with
exiftool -TagsFromFile %f.arw "-Filename<_${XMP:Description}.jpg" -ext jpg .
Though test it out first using Testname instead of Filename, as I haven't tested it to see if it works.