Hi!
I tried to use ExifTool to sort my images, but I have one problem. I create a filename and everything works as expected, files are moved and renamed the correct way. BUT, now I want to add that -o switch to leave the original files in place and copy them to the target, but as soon as I had the -o parameter everything went nuts?
exiftool -r '-filename</srv/backups/test/${model;}/${DateTimeOriginal#;DateFmt('%Y/%m/%d')}/${FocalLength;}/${Software}/${DateTimeOriginal#;DateFmt('%H_%M_%S')}.$FileTypeExtension' .
runs fine, but exiftool -o -r '-filename</srv/backups/test/${model;}/${DateTimeOriginal#;DateFmt('%Y/%m/%d')}/${FocalLength;}/${Software}/${DateTimeOriginal#;DateFmt('%H_%M_%S')}.$FileTypeExtension' .
ignores the -r switch. I tried on Debian Stretch and on Windows 10. I also tried "-o dummy/" as mentioned somewhere, but then all images just end up in that dummy-folder with their original names. What am I doing wrong? please help :-)
regards,
Volker
The -o (outfile) option (https://exiftool.org/exiftool_pod.html#o-OUTFILE-or-FMT--out) requires an additional parameter. Normally, it would be the target directory/filename but since you are using the Filename pseudo-tag, that would take priority over the target filename of the -o.
So all you need to do is provide a dummy argument for -o. In your example, the -r was being used as the dummy argument. Change it to -o dummy -r and it should work. See this example (https://exiftool.org/exiftool_pod.html#exiftool--o-.--DirectoryDateTimeOriginal--d-Y-m-d-dir) under Renaming Examples.
Thanks for the tip! But it seems my problem comes from using 'createdatetime' two times? So exiftool cant generate my filename and sets it to 'dummy'. I'll have to look deeper into this.
I recommend using -o dummy/ or -o . or -o not_renamed/. If you just use "dummy" with no trailing slash, then the file will get renamed to "dummy" unless the "dummy" directory exists. The trailing slash forces it to be a directory name.
But your command won't work because your quoting is bad. You must use double quotes for the DateFmt() argument since it is inside a single-quoted command-line argument.
Also, setting the FileName will fail if any of the tags you are using don't exist.
- Phil