[Originally posted by jtp755 on 2009-10-09 02:27:44-07]I am working on converting a script i use on linux for a friend that uses Windows. I did not have a problem with the directory renaming but the file renaming is giving me a problem.
Here is the command i am using:
exiftool.exe '-FileName<${FileNumber}_${DateTimeOriginal}.%e' -d "%Y%m%d" -R 2009\
The directory renaming command that WORKS is:
exiftool.exe "-Directory<DateTimeOriginal" -d "%Y/%m-%d" -R 998CANON\
Can someone point me in the right direction?
Thanks!
[Originally posted by mixx on 2009-10-09 06:07:52-07]
My pictures do not have a Filenumber, but as for the rest: it is the usual Linux-Windows thing: the single and double quotes must be the other way round (i.e. you need to use double quotes in the file rename command line, just as you do in the dir rename).
Cheers, Mixx
[Originally posted by davitof on 2009-10-09 06:17:26-07]Double quotes (") instead of single quotes ('), but that was probably a typo in the post. What does not work in my system is that directories are named as $filenumber_$year (i.e. 100-1003_2007), as if the FileName pseudo-tag actually meant "directory\fileName". Is that your problem too?
I don't know why what you are doing works only in linux, but I believe I succeeded in my Vista system this way:
exiftool.exe "-FileName<${FileNumber}_$DateTimeOriginal.%e" -d "%Y/%m%d" "-Directory<DateTimeOriginal" -d %Y -R 2009
Note that this command gave probably unwanted results when the tags were not in the original file. For example, for pictures which don't have a FileNumber tag, exiftool only appended a "_" to the original file name.
I don't use FileNumber because some brands of cameras don't implement this tag, in my case Canon pictures have it and Fuji pictures don't. I use
"-FileName<DateTimeOriginal" -d %Y%m%d%H%M%%-.4nc.%%e
instead, which gives me a unique name even if I have 2 images derived from the same original in the same directory.
[Originally posted by jtp755 on 2009-10-09 10:28:22-07]
Thanks to both of you who responded. It was the single quotes need to be double quotes. Changed that and it worked perfectly.
Im not worried about the FileNumber that much because i only use Canon cameras and if i get pictures from someone else i name them according to the person/photographer and/or event.
Thanks much!