%tempfile% (can be used with indexes: %tempfile1%, %tempfile2%, etc.)
2.0
Will be replaced by name of a temporary file.
%tempfiledel% (can be used with indexes: %tempfiledel1%, %tempfiledel2%, etc.)
2.0
Will be replaced by name of a temporary file. The temporary file will be deleted when task execution is complete.
%tempfilelog% (can be used with indexes: %tempfilelog1%, %tempfilelog2%, etc.)
2.0
Will be replaced by name of a temporary file. The temporary file content will be added to the log file when task execution is complete.
%tempfilelogdel% (can be used with indexes: %tempfilelogdel1%, %tempfilelogdel2%, etc.)
2.0
Will be replaced by name of a temporary file. The temporary file content will be added to the log file and the temporary will be deleted when task execution is complete.
Variables
Name of a variable defeined in a SET VARIABLE statement, enclosed in percent signs.
6.0
Will be replaced by variable value. These variables exist after being defined in the statement until the task execution completes. Each variable is expanded when assigned in the statement and may include other variable types, even self-referentially.
Standard variables
%actionname%
6.0
Will be replaced by name of the task.
%actiontime%
2.0
Will be replaced by time of start of task execution.
%actionschedule%
2.0
Will be replaced by name of the action that caused task execution.
%actionsource%
2.0
Will be replaced by action source information.
%actionsourceextra%
2.0
Will be replaced by action source extra information.
%lasterrorcode%
2.0
Will be replaced by LastErrorCode. This value is the error code of the previous action. You can find its meanings in the corresponding shortcut type description.
%lastexitcode%
2.0
Will be replaced by LastExitCode. This value is the exit code of the previous action. You can find its meanings in the corresponding shortcut type description.
Definitions
%file:drive:[variable]%
11
Will be replaced by drive letter, ending with backslash, extracted from a variable.
%file:path:[variable]%
11
Will be replaced by path, ending with backslash, extracted from a variable.
%file:file:[variable]%
11
Will be replaced by full file name without path, extracted from a variable.
%file:name:[variable]%
11
Will be replaced by file name without extension, extracted from a variable.
%file:ext:[variable]%
11
Will be replaced by file name extension, extracted from a variable.
%datetime:[format]% (can be used with %datetime% format specifiers: %datetime:yyyy-MM-dd HH-mm-ss%, etc.)
6.0
Will be replaced by current date or time.
%random:[format]% (can be used with %random% format specifiers: %random:nnnnnn%, etc.)
6.0
Will be replaced by random text.
Global variables
Name of a global variable, defeined in the "Global variables" section on the "Preferences" window, enclosed in percent signs.
11
Will be replaced by the value of the global variable. Global variables are expanded when used, so a global variable can't include another global variable to prevent recursion.
All editions
Variable definition
Introduced in version
Description
Environment variables
Environment variable name enclosed in percent signs.
2.0
Will be replaced by variable value.
%% (can be used to pass environment variables to command line without their unwanted expansion. For example, %%USERNAME%% will be passed as %USERNAME%).
6.0
Will be replaced by percent sign.
%datetime% format specifiers
Format specifier
Introduced in version
Meaning
longdate
6.0
Long date pattern in system format.
shortdate
6.0
Short date pattern in system format.
time
6.0
Time date pattern in system format.
zz
6.0
Name of current time zone.
z
6.0
GMT offset of current time zone.
dddd
6.0
Long day of week.
ddd
6.0
Short day of week.
dd
6.0
Day of month, two digits always.
d
6.0
Day of month, one or two digits.
wwww
11
Long day of week.
www
11
Short day of week.
ww
11
Weekday as a decimal number with Monday first, two digits always.
w
11
Weekday as a decimal number with Monday first, one or two digits.
uuuu
11
Long day of week.
uuu
11
Short day of week.
uu
11
Weekday as a decimal number with Sunday first, two digits always.
u
11
Weekday as a decimal number with Sunday first, one or two digits.
MMMM
6.0
Long month name.
MMM
6.0
Short month name.
MM
6.0
Month, two digits always.
M
6.0
Month, one or two digits.
yyyy
6.0
Year, four digits.
yyy
6.0
Year, four digits.
yy
6.0
Last two digits of the year, two digits always.
y
6.0
Last two digits of the year, one or two digits.
jj
11
Day of the year, three digits always.
j
11
Day of the year, 1-3 digits.
WW
11
Week number with the first Monday as the first day of week one, two digits always.
W
11
Week number with the first Monday as the first day of week one.
UU
11
Week number with the first Sunday as the first day of week one, two digits always.
U
11
Week number with the first Sunday as the first day of week one.
hh
6.0
Hour in 12-hour format, two digits always.
h
6.0
Hour in 12-hour format, one or two digits.
HH
6.0
Hour in 24-hour format, two digits always.
H
6.0
Hour in 24-hour format, one or two digits.
mm
6.0
Minutes, two digits always.
m
6.0
Minutes, one or two digits.
ssss
11
Milliseconds, three digits always.
sss
6.0
Milliseconds, 1-3 digits.
ss
6.0
Seconds, two digits always.
s
6.0
Seconds, one or two digits.
tt
6.0
Long AM/PM indicator.
t
6.0
Short AM/PM indicator.
\
6.0
The subsequent character will be interpreted as "any text" (see below).
any text
6.0
Any characters that do not match to the above format specifiers. Will remain unchanged.
%random% format specifiers
Format specifier
Introduced in version
Meaning
d
6.0
Random digit.
a
6.0
Ramdom alpha character.
A
6.0
Ramdom capital alpha character.
n
6.0
Ramdom alphanumeric character.
N
6.0
Ramdom capital character.
\
6.0
The subsequent character will be interpreted as "any text" (see below).
any text
6.0
Any characters that do not match to the above format specifiers. Will remain unchanged.
Leave a Reply
You must be logged in to post a comment.