exiftool fixing Exposure x6 workflow

Started by goran77, November 07, 2020, 02:17:19 AM

Previous topic - Next topic

goran77

Hi,

I have images in a folder, they may be either JPGs or RAF and they of course have some metadata. For JPGs they are embedded into images, for RAF files they are in sidecar files. So I may have:

DSCF00001.JPG
DSCF00002.RAF
DSCF00002.xmp

Those files are in folder SomeFolder. Then there is two level deep subfolder of folder SomeFolder:
SomeFolder/Exposure Software/Exposure X6

In that subfolder, there are additional XMP files named like this:
SomeFolder/Exposure Software/Exposure X6/DSCF00002.RAF.exposurex6
or
SomeFolder/Exposure Software/Exposure X6/DSCF00001.JPG.exposurex6

What I need is to copy xmp:rating from folder SomeFolder to files in subfolder. This is because I use other tool for rating and once you make changes to a file in Exposure 6, it copies this rating from JPGs and XMPs to it's own XMP in another folder. After you make first change you can't make a change to rating (in another tool) any more and see this reflected in Exposure x6.

The most I could come up with is:
exiftool -TagsFromFile .\%f.xmp -xmp:rating -ext exposurex6 .\ExposureSoftware\ExposureX6\

but this does not work for several reasons (the way I understand it). First is that if source filename is XMP file (in case of RAF file), then %f is not same as destinations %f.
%f for destination file it is DSCF00002.JPG (afer stripping .exposurex6 for extension)
and
%f for source is DSCF00002

And second reason is that it would only handle either JPGs or RAF files (with some changes). But I need it to search for metadata in either JPG or xmp for RAF format.

So, can anyone please help?

Thanks

StarGeek

Quote from: goran77 on November 07, 2020, 02:17:19 AM
but this does not work for several reasons (the way I understand it). First is that if source filename is XMP file (in case of RAF file), then %f is not same as destinations %f.
%f for destination file it is DSCF00002.JPG (afer stripping .exposurex6 for extension)
and
%f for source is DSCF00002

Try %-.4f.  That will strip an additional four characters from the end of the base filename.  See the Advanced features section of the  -w (textout) option for details.

QuoteAnd second reason is that it would only handle either JPGs or RAF files (with some changes). But I need it to search for metadata in either JPG or xmp for RAF format.

Try adding a second -TagsFromFile option.
-TagsFromFile .\%f.xmp -xmp:rating -TagsFromFile .\%f.jpg -xmp:rating
This will copy the Xmp:Rating from the jpg unless the jpg doesn't exists, then it will fall back to and copy from the xmp, i.e. jpg has priority over xmp in this example.  Swap them if you want the xmp to have priority.  You must include the tags you want copied after both -TagsFromFile options.
* 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).

goran77

Great! Thanks, those two suggestions did the trick.