...previous
BUILT-IN VARIABLES
It is allowed to use special keywords in schedule commands, named
also built-in variables. Such keywords replaced before execution
as well as environment variables. It is possible to use it in any place of
executive path of a command or instruction. All keywords begins from
two simbols *?. Following part of identifier
defines values replaces this variable. Identifiers is case-sensetive!
There are following variables:
- *?TODAY_ - replaced with current date in format "DD.MM.YY". For
example, if command executed on July 7, 1999, then
executed command line will contain such text: 07.07.99
in place of *?TODAY;
- *?DAY-XX - replaced with date XX days ago in format
"DD.MM.YY" . For example, text *?DAY-10 before execution
on July, 7, 1999 will be replaced with 27.06.99.
Two digits are required. If days offset less than 10, you must place
zero as a first digit;
- *?DATE__ - replaced with current date in format "YYYYMMDD".
For example, July 5, 1999 will be replaced with 19990705;
- *?TIME__ - replaced with current time in format "HH:MM:SS".
For example, command, contains this variable and executed on 19:45:14 o'clock
will contains text 19:45:14;
- *?TIME6 - replaced with six digit representation of current time
"HHMMSS", for example 132001
- *?DAT-XX - replaced as well as *?DAY-XX,
but format as *?DATE__
("YYYYMMDD");
- *?USER - replaced with current user name (logon name);
- *?HOST - replaced with host name (computer name).
- *?TODAYdd - replaced with two digits current date (01,15,27, etc.)
- *?TODAYmm - replaced with two digits current month
- *?TODAYy2 - replaced with two digits current year
- *?TODAYy4 - replaced with four digits current year
- *?WEEKDAY - replaced with two digits day of week
- *?YEARDAY - replaced with three digits day of year (January,1 = "001",
December, 31 = "365" ("366"))
- *?code - replaced with character represented by numeric code.
For example, *?13 - CR (carret return), *?10 - LF (line feed),
*?9 - HT (horizontal tabulation), etc. Can be used decimal,
hexadecimal, ocal or binary based numbers. Decimal must
lead with any digit exclude zero, octal must lead with zero,
hexadecimal with "0x", binary with "0b". For example, following
expressions is equivalent: *?13 = *?015 = *?0xD = *?0b1101.
NOT case sensetive (*?0Xd = *?0xD).
Examples:
- Command
  xcopy32 c:\source\*.* d:\dest /d:*?DAY-07
on March, 10 will be following
  xcopy32 c:\source\*.* d:\dest /d:03.03.99
and copy files, changed only after March, 3
- Command
  pkzip -a -p e:\dest\*?DATE__ c:\source\*.*
on March, 5 will be following:
  pkzip -a -p e:\dest\19990305 c:\source\*.*
and create archive with filename 19990305.zip
You can offer additional variables.
...next