how to use -d fmt with tagsfromfile?

Started by Archive, May 12, 2010, 08:54:31 AM

Previous topic - Next topic

Archive

[Originally posted by fpietri on 2009-02-22 15:33:45-08]

Hi all,

I'd like to do something like this:

exiftool -all= -tagsfromfile -d "H:/PHOTO/CR2/%Y_CR2/%m-%Y_CR2/%d-%m-%Y_CR2/%f.CR2" -r -overwrite_original -ext JPG H:\PHOTO\JPG\2008_JPG\12-2008_JPG\26-12-2008_JPG

but of course this doesn't work because tagsfromfile doesn't accept -d option...

Help is welcome.

In fact, I want to recursively rewrite all JPG images in a directory with information copied from the corresponding CR2 images in an other directory. Directory structure is almost the same except "JPG" is replaced by "CR2":

H:\PHOTO\JPG\2008_JPG\12-2008_JPG\26-12-2008_JPG\

H:\PHOTO\CR2\2008_CR2\12-2008_CR2\26-12-2008_CR2\

Thx for your answer.

Regards.

Archive

[Originally posted by exiftool on 2009-02-22 21:16:23-08]

It would have been much better if you had named your directory
structure like this:

H:\PHOTO\JPG\2008\12-2008\26-12-2008\

H:\PHOTO\CR2\2008\12-2008\26-12-2008\

then this would have been easy.  However, there is a messy
solution which will work, but only if the images are always at the
same depth in the directory structure and the directory names are
always the same length:

exiftool -all= -tagsfromfile H:\PHOTO\CR2\%4.13d_CR2\%7.22d_CR2\%10.34d_CR2\%f.CR2 -r -overwrite_original -ext jpg H:\PHOTO\JPG

- Phil