[Originally posted by pascal on 2006-12-03 08:52:56-08]
Hello,
Newbie in (marvelous) ExitTool, I plan to copy EXIF information from .CR2 raw file extract by DCRAW in a .TIFF 16 bits linearized file (because DCRAW looses some information doing the job).
Using the following command line :
"C:\Program Files\Exiftool\exiftool.exe" -v1 -tagsfromfile %d%f.CR2 -overwrite_original -ext tiff .\ -directory=%d%-.3f .\ -filename=%f.tif %d%-.3f/%f.tiff
ExifTool does the job : copy EXIF information from .CR2 files to matching .TIFF files, then create a sub folder in current folder named by the body (without extension and last 3 characters) of CR2 files; then it transforms tiff extension in tif (for local purpose ...).
But if I try this (to create sub folder based on the creation date of the CR2 files :
"C:\Program Files\Exiftool\exiftool.exe" -v1 -tagsfromfile %d%f.CR2 -overwrite_original -ext tiff .\ -d %Y_%m_%d_%%-.3f "-directory<datetimeoriginal.\ "-filename=%f.tif %d%-.3f/%f.tiff
it does not work.
Any idea ?
Thanks
Pascal
[Originally posted by exiftool on 2006-12-03 13:58:37-08]Hi Pascal,
It is likely something wrong with your command line. Unfortunately it is
difficult for me to decipher due to the html text munging above. Could
you put your command-line inside a
...
element?
For instance, there is an extra ".\" after "datetimeoriginal" in your 2nd command
that could mess things up, but I suspect this isn't really in your command line.
Also, I'm not quite sure about the extra "%d%-.3f/%f.tiff" at the end, since it doesn't
seem to be part of any command-line option.
- Phil
[Originally posted by pascal on 2006-12-03 18:58:25-08]Hi Phil,
Sorry for the bad format. I'll try to write better. The command line is :
"C:\Program Files\Exiftool\exiftool.exe" -v1 -tagsfromfile %d%f.CR2 -overwrite_original -ext tiff .\ -d %Y_%m_%d_%%-.3f "-directory<datetimeoriginal.\ "-filename=%f.tif %d%-.3f/%f.tiff
I'll test again upon your first remarks.
Thanks a lot.
Sincerely,
Pascal
[Originally posted by exiftool on 2006-12-03 19:50:05-08]Hi Pascal,
Thanks. I'm still not sure what the last "%d%-.3f/%f.tiff" in your
command is for, because it doesn't make sense to me. Also,
there is still a problem with ".\ " after the "datetimeoriginal".
But I have fixed these and the following command line still doesn't
do exactly what you wanted because the file doesn't get renamed
properly to ".tif":
exiftool -v1 -tagsfromfile %d%f.CR2 -overwrite_original -ext tiff -d %Y_%m_%d_%%-.3f "-directory<datetimeoriginal" -filename=%f.tif .
This looks to be a bug in exiftool. Setting the directory name from
-tagsFromFile is somehow killing the filename that you had set. I
will fix this in the next release (6.61). Until then, you can work around
this problem by setting the filename and directory together. (Both are
set via -filename if the name includes a directory specification.) Here
is one way to do this:
exiftool -v1 -tagsfromfile %d%f.CR2 -overwrite_original -ext tiff -d %Y_%m_%d_%%-.3f/%%f.tif "-filename<datetimeoriginal" .
I think this will do what you want.
- Phil
[Originally posted by exiftool on 2006-12-03 20:04:48-08]
Wait. Did you also want to copy tags over from the CR2
at the same time as renaming the TIFF? To do this, you
need to add "-all" or "-all:all" after the "-tagsfromfile" argument.
(The "-all" writes to the preferred locations, while "-all:all"
preserves the original information locations.)
- Phil
[Originally posted by exiftool on 2006-12-04 13:16:47-08]After some more careful testing, I don't think there is a bug after all.
I think the problem was that the CR2 file I used for that command
didn't contain a DateTimeOriginal tag -- this is why the directory didn't
get set properly. But with an appropriate CR2 image, the command
works just fine:
% ls *.tiff
IMG_0547.tiff
% exiftool -v1 -tagsfromfile %d%f.CR2 -overwrite_original -ext tiff -d %Y_%m_%d_%%-.3f "-directory<datetimeoriginal" -filename=%f.tif .
======== ./IMG_0547.tiff
Setting new values from ./IMG_0547.CR2
'./IMG_0547.tiff' --> '2006_01_12_IMG_0/IMG_0547.tif'
1 directories scanned
1 image files updated
% ls *.tiff
tcsh: ls: No match.
% ls 2006_01_12_IMG_0/
IMG_0547.tif
- Phil