-filename<$DateTimeOriginal rename problem

Started by OOmatrixOO, July 18, 2017, 03:14:54 PM

Previous topic - Next topic

OOmatrixOO

Hello.
I use this to rename my photos. And it work.
exiftool -o "Bearbeitet/" -fileOrder DateTimeOriginal "-filename=#%%1.3C.%%le" "-filename<$DateTimeOriginal %%1.3C.%%le" -d %%Y-%%m-%%d -ext jpg

But if i set a underscore after $DateTimeOriginal, it doesnt work anymore.
exiftool -o "Bearbeitet/" -fileOrder DateTimeOriginal "-filename=#%%1.3C.%%le" "-filename<$DateTimeOriginal_%%1.3C.%%le" -d %%Y-%%m-%%d -ext jpg

What can I do to make this work?

Thanks.

StarGeek

Because you're adding characters directly onto the end of the tag name, the tag names needs to be separated from the rest of the command.  You can use brace { } characters to do this (see the docs under the -p option).  So try this as your command:

exiftool -o "Bearbeitet/" -fileOrder DateTimeOriginal "-filename=#%%1.3C.%%le" "-filename<${DateTimeOriginal}_%%1.3C.%%le" -d %%Y-%%m-%%d -ext jpg
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).