Hi Phil,
My question is related to this thread: https://exiftool.org/forum/index.php/topic,3989.0.html
There I "suggested" a solution, which doesn't work after all. Here's the scenario:
c:\MyJpg
∟Dir1
∟Dir2
c:\MyRaw
∟Dir1
∟Dir2
MyJpg directory contains two directories with JPG files and MyRaw contains two directories with CR2 files; otherwise content of MyJpg and MyRaw directory is identical (contains same named subdirectories and filenames). What I'm trying to do is, copy metadata from CR2 files to JPG files.
I have tried the following command:
exiftool -tagsFromFile d:\MyRaw\%f.cr2 -r -all:all --Makernotes -ext jpg d:\MyJpg
-but this doesn't work.
Then I tried:
exiftool -tagsFromFile d:\MyRaw\Dir1\%f.cr2 -r -all:all --Makernotes -ext jpg d:\MyJpg
-now, only files is Dir1 are changed, but not those in Dir2 (Dir2 is subdirectory inside Dir1).
In short, how to achieve what I want?
Bogdan
Hi Bogdan,
To do this, you must include the directory specification in the -tagsFromFile argument. One way to handle the directory structure you gave is to be careful about where you start so you can modify the directory accordingly to reach the raw files. At the command line, it could look something like this:
cd c:
cd \MyJpg
exiftool -tagsFromFile ..\MyRaw\%d\%f.cr2 -r -all:all --Makernotes -ext jpg .
There are ways to do this from any directory, but it is trickier because you must take a substring of the directory:
exiftool -tagsFromFile d:\MyRaw\%.9d%f.cr2 -r -all:all --Makernotes -ext jpg d:\MyJpg
The %.9d in this command gives the directory name of the JPG image with the first 9 characters removed.
- Phil
Thank you very much -it works now, of course.
I'm afraid, after a while, I will forget this (again)... so I'll try to implement that in GUI.
Bogdan