Hi!
I know it's pretty easy to move files into new directory using one exif tag. For example if I want to create a directory from "Headline" tag I use:
exiftool -d %Y-%m-%d "-directory<Headline" filename.jpg ;
But I now want to use two exif tags (ProgramVersion+Headline). How do I make it happen?
Thanks in advance
Try this
exiftool -d %Y-%m-%d "-directory<$ProgramVersion_$Headline" filename.jpg
Change the underscore into whatever character(s) you want to separate the tags with.
Quote from: StarGeek on September 15, 2014, 02:20:40 PM
Try this
exiftool -d %Y-%m-%d "-directory<$ProgramVersion_$Headline" filename.jpg
Change the underscore into whatever character(s) you want to separate the tags with.
yeah I've been trying the same thing, but I can't get it work:
exiftool -d %Y-%m-%d "-directory<$Filename_$Headline" *.jpg
Warning: No writable tags set from f_001.jpg
Warning: No writable tags set from f_002.jpg
Warning: No writable tags set from f_003.jpg
Warning: No writable tags set from f_004.jpg
Warning: No writable tags set from f_005.jpg
0 image files updated
5 image files unchanged
Note that both ProgramVersion and Headline must exist or nothing will be copied.
There is also a problem with your command. Since "_" is a valid character in a tag name, you must put braces around ProgramVersion to separate it from the "_":
exiftool -d %Y-%m-%d "-directory<${ProgramVersion}_$Headline" filename.jpg
Also note that this quoting is for Windows. Mac and Linux users need to use single quotes instead.
- Phil
thanks Phil! Works perfectly!
Great.
One more thing I didn't notice until now. The -d %Y-%m-%d is completely superfluous in your command since you are not copying any date/time tags. So you can drop this and make your command simpler.
- Phil
Quote from: Phil Harvey on September 15, 2014, 07:40:57 PM
There is also a problem with your command. Since "_" is a valid character in a tag name, you must put braces around ProgramVersion to separate it from the "_":
Oops, my mistake. That's what I get for not testing it out first.