concatenation of static text -from bat file

Started by ennogrue, August 14, 2011, 07:54:29 PM

Previous topic - Next topic

ennogrue

Hello,
I use
exiftool.exe -d "AAAA-%Y-%m-%d--%H-%M-%S%%-c.%%e" "-filename<datetimeoriginal" *.AVI
to get this output:
AAAA-2011-07-31--19-50-21.AVI
in Windows Vista.
From the command line this works fine,
but from a bat file I get this:
AAAA-m-H-S.AVI
I experimented a lot but couldn't get it to work.
Regards,
Enno

Phil Harvey

Hi Enno,

The "%" character is special in a Windows .bat file.  You must replace each % with %% when you use a command in a .bat file.

- 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 ($).

ennogrue

Hi Phil,
cool, it works!
Thanks a lot, you are a guru!
Enno