News:

2023-08-10 - ExifTool version 12.65 released

Main Menu

Windows Batch Variables

Started by Archive, May 12, 2010, 08:54:01 AM

Previous topic - Next topic

Archive

[Originally posted by bobbyandck on 2007-02-24 17:18:01-08]

Dear Phil,

Following your great help a month ago with Sorting pictures into folders, I have been trying to put it all into a windows batch file (in order to avoid having to retype the whole line (some 230 characters)) but this has brought up a error.

Code:
exiftool(-k).exe -d %Y "-directory<$iptc:category/$datetimeoriginal" -v3 a.jpg

The % sign is understood by windows as being followed by a variable, but as there is no definition of Y then the command line removes that part of the line, therefore giving errors.

would it be possible to use another sign ?

thank you for your assistance,

Andrew

Archive

[Originally posted by exiftool on 2007-02-24 19:41:09-08]

Hi Andrew,

As you noted, the "%" character is special in a Windows batch file.
In this context, a percent character must be represented by "%%"
(this is the same method as in a C printf statement).

So in your case, I think what you want is "-d %%Y" inside a Windows
batch file.

- Phil

Archive

[Originally posted by bobbyandck on 2007-02-26 11:07:41-08]

That works fine,
 thank you and sorry for being such a newbie https://exiftool.org/forum/Smileys/default/smiley.gif" alt="Smiley" border="0" />