too stupid to use one parameter?

Started by vklaffehn, June 08, 2019, 08:19:42 PM

Previous topic - Next topic

vklaffehn

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

StarGeek

The -o (outfile) option 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 under Renaming Examples.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

vklaffehn

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.

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).