|
TaskMaster / TMLite Quick Reference
Batch Commands / Scripting Language (As of: v4.20 / Updated: 07 Nov 2008) Enhanced Batch Commands / Script Language supported in Task (.TSK) scripts run manually (TMRUN), scheduled (TMSCHEDULE), or launched (CALL) Syntax : { } item required [ ] item optional | OR Options : Must be separated by space |
|||||||||||
| Commands | |||||||||||
| Command Syntax | Comments / Examples | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
ABORT
[cmd | task]
|
Cancel active task (ABORT) or the specified cmd (ABORT cmd) or task (ABORT task). (See also ABORT Local Server Command in the Extended Console Commands.) | ||||||||||
ACTIVE SCREEN
["screen_name"]
|
Note: Obsolete (supported for backwards compatibility). Replacement: CONSOLE SCREEN | ||||||||||
CALC
{Dynamic Variable}
{calculation}
|
Perform basic integer math calculations
(+ Add, - Subtract, * Multiply, / Divide)
storing result in specified Dynamic Variable.
// Results stored in %0, %VAR00% & %PCT%, respectively
Notes: Evaluates Left-to-Right. Entire calculation must reside on one line. If Dynamic or Environment Variables are used in the calculation, the current contents are substituted prior to computation. If result variable has fixed digit format, CALC will retain format (refer to DEFINE). |
||||||||||
CALL
[[vol:]path\]{task}[.ext]
|
Calls (launches) specified {task}. Task issuing CALL is paused until CALLed {task} completes. | ||||||||||
CHANGE SCREEN
["screen_name"]
|
Note: Obsolete (supported for backwards compatibility). Replacement: CONSOLE SCREEN | ||||||||||
CLOSE READ [#n]
|
CLOSE READ closes active OPEN READ files (all or #0 - #9 as specified)
CLOSE WRITE closes active OPEN WRITE files (all or #0 - #9 as specified) CLOSE all active OPEN READ & OPEN WRITE files |
||||||||||
CONSOLE SCREEN
["screen_name"]
|
Changes and activates the screen that is actively displayed on the
Server Console.
Notes: "screen_name" can be partial (i.e., "System" for the System Console). Specifying "" or nothing activates the next NLM screen. Also sets CURRENT SCREEN to the new screen. |
||||||||||
CURRENT SCREEN
["screen_name"]
|
Changes the screen against which the active task performs
keyin / screen interrogation commands.
Notes: "screen_name" can be partial (i.e., "System" for the System Console). Specifying "" or nothing activates the next NLM screen. |
||||||||||
DEBUG
{OFF | ON}
|
Disables (OFF) / Enables (ON) the logging of task processing activity to
a file with the same vol:path\filename as the task but with a .DBG
extension (default = OFF).
Note: Only practical for task debugging. |
||||||||||
DEFINE
{Dynamic Variable}
{string}
|
Define the contents of a Dynamic Variable
(Aliased
or
Defined).
// Store text string 'Hello World!' in Defined Variable %0
// Store custom greeting (with day/date) in Defined Variable %VAR00%
// Store pre-formatted 4 digit value of 0000 in Defined Variable %0
// Increment value of Defined Variable %0 by 2 (0000 + 2 = 0002)
and store result in Defined Variable %1
// Decrement value of Defined Variable %1 by 1 (0002 - 1 = 0001)
and store result in Aliased Variable %COUNTER%
Notes:
|
||||||||||
DELAY
{##}
|
Silently suspend batch processing for {##} milliseconds (min = 50 ms - max = 4294967295 ms). | ||||||||||
ECHO [. | string]
|
Echo (display) any trailing comments to screen created for the task.
// Echo a blank line
// Echo the day of the week (Monday - Sunday)
// Echo the batch commands as processed (default = OFF)
// Echo a blank line and write it to the OPEN_WRITE #0 file
// Echo the day of the week and write it to the OPEN_WRITE #3 file
Notes:
ECHO OFF | ON controls the display of Batch Commands to the screen
created for the active task (default = OFF).
|
||||||||||
EXIT
|
Exits (silently terminates) the currently active task. | ||||||||||
FINDCHR
{Dynamic Variable}
{"c"} {"str"} [opt]
|
Find the position of character ("c") in string ("str") and
store the result in the specified Aliased or Defined Variable.
Notes: The first specification receives the result of the search
(0 = not found or 1 - length of string = position of "c" in "str")
so it must be a Aliased or Defined Variable.
The second and third can be a text string,
a Dynamic
an Environment Variable,
or any combination thereof but must be enclosed in double quotes.
If the second specification contains more than one character, only the
first character is used for the search.
|
||||||||||
FINDLEN
{Dynamic Variable}
{"str"}
|
Find the length of (number of characters in) string ("str") and
store the result in the specified Aliased or Defined Variable.
Notes: The first specification receives the result (the length) so it must be an Aliased or Defined Variable. The second can be a text string, a Dynamic or an Environment Variable, or any combination thereof but must be enclosed in double quotes. |
||||||||||
FINDSTR
{Dynamic Variable}
{"sub"} {"str"} [opt]
|
Find the position of substring ("sub") in string ("str") and
store the result in the specified Aliased or Defined Variable.
Notes: The first specification receives the result of the search
(0 = not found or 1 - length of string = position of "sub" in "str")
so it must be an Aliased or a Defined Variable.
The second and third can be a text string,
a Dynamic
or
an Environment Variable,
or any combination thereof but must be enclosed in double quotes.
|
||||||||||
GOTO
{label}
|
Transfers batch execution to the line marked by {:label}.
// Jump to the label :EXIT
// Conditionally jump to the label :EXIT
Notes: GOTO should not be used within IF/WHILE structures. Any task line beginning with a colon (:) is considered a label. |
||||||||||
KEYIN {key}
|
Used to enter string and/or special keys into the screen against which
the active task performs keyin / screen interrogation commands as if
input from the Server's keyboard.
// Type the "password" then press ENTER
Special keys:
Notes: Multiple "string" & key combinations can be used in a single KEYIN. "string" can be a text string, a Dynamic or an Environment Variable, or any combination thereof but must be enclosed in double quotes. Use CONSOLE SCREEN / CURRENT SCREEN to change the current task I/O screen. |
||||||||||
OPEN READ [#n] [[vol:]path\]{file}
|
Opens the specified text file ([[vol:]path\]{file}) for sequential read
input of text data using the READ Batch Command.
Notes: The ERRORLEVEL condition is set TRUE if the file cannot be opened. Up to 10 (#0 - #9) OPEN READ files can be open simultaneously. If no handle number (#0 - #9) is specified, handle #0 is used. Issuing an OPEN READ using a handle already in use will result in the previously opened file being closed before an attempt is made to open the new file. |
||||||||||
OPEN WRITE [#n] [[vol:]path\]{file}
[opt]
|
Opens the specified text file ([[vol:]path\]{file}) for sequential write
output of text data using the
ECHO WRITE or WRITE Batch Commands.
Notes:
The ERRORLEVEL condition is set TRUE if the file cannot be opened.
If no handle number (#0 - #9) is specified, handle #0 is used.
Up to 10 (#0 - #9) OPEN WRITE files can be open simultaneously.
Issuing an OPEN WRITE using a handle already in use will result in the
previously opened file being closed before an attempt is made to open
the new file.
|
||||||||||
PARSE
{Dynamic Variable}
{string}
{#-#[,..]}
[opt]
|
Parse (extract) data from string into an Aliased or Defined Variable.
// Parse byte 80 of Defined Variable %2 into Defined Variable %1
// Parse bytes 1-10 of Defined Variable %2 into Defined Variable %1
// Parse byte 10 and bytes 20-29 of Defined Variable %2
into Defined Variable %VAR01%
// Parse byte 10 and bytes 20-29 of Defined Variable %2
into Defined Variable %VAR01% appending to any existing contents
// Parse bytes 1-10 and bytes 40-99 of Defined Variable %2
into Aliased Variable %KEY% (truncating if shorter)
Notes:
|
||||||||||
PAUSE
[##]
|
Suspend batch processing until a key is pressed on the Server's keyboard of the specified (##) timeout period occurs (in seconds). | ||||||||||
READ
[#n]
{Dynamic Variable}
[#-#[,..]] [opt]
|
Reads the next sequential text record from the OPEN READ [#n] file and
parses / stores the data into the specified Aliased or Defined Variable.
// Read next sequential record and store data in Defined Variable %1.
// Read next sequential text record and store bytes 10-20 in
Defined Variable %1.
// Read next record, storing bytes 1, 11-50 and 512-598 in
Aliased Variable %DATA%
(pad with spaces if less than 128 bytes retrieved).
// Read next record, storing bytes 1 and 10-127 in
Aliased Variable %DATA1%
(pack or truncate if less than 119 bytes retrieved).
Notes:
The ERRORLEVEL condition is set TRUE if a |
||||||||||
REFORMAT
{Dynamic Variable}
[opt]
|
Reformat the data stored in the specified Aliased or Defined Variable.
// Left justify (shift data left to replace leading spaces)
the data in Defined Variable %1
(Before:
// Right justify (shift data right to replace trailing spaces)
the data in Defined Variable %1
(Before:
// Pack (remove leading zeroes / leading & trailing spaces)
the data in Defined Variable %1
(Before:
// Re-size to 6 bytes
the data in Defined Variable %1
(Before:
// Left justify, pack and re-size to 6 bytes
the data in Defined Variable %VAR00%
(Before:
// Pack, right justify and re-size to 6 bytes
the numeric data in Aliased Variable %COUNT%
(Before:
// Pack, right justify and re-size to 6 bytes
the text data in Aliased Variable %COUNT%
(Before:
Notes:
The single quote marks in the examples are only used to delineate
the data (i.e., not considered part of the variable contents).
|
||||||||||
REPLACE
{Dynamic Variable}
{"??[..]"}
|
Searches the specified Aliased or Defined Variable for
the first character in each specified pair and replaces every
occurrence found with the second character in each specified pair.
// Replace dot with dash in Defined Variable %1
(Before: "1.2.3" / After: "1-2-3")
// Replace braces with brackets in Aliased Variable %GREETING%
(Before: "{Hi}" / After: "[Hi]")
Note: Replacement string must "??" have at least one pair of characters specified. |
||||||||||
REWIND
{READ | WRITE} [#n]
|
Reset sequential file record pointer to start of file (same as if closed then re-opened). | ||||||||||
SAVE SCREEN
[[vol:]path\]{file} [opt]
|
Captures the text image of the the current screen against which the
active task performs keyin / screen interrogation commands to {file}.
|
||||||||||
SHIFT
|
Shifts the contents of the Defined Variables %0 - %9 left one position, clearing %9. | ||||||||||
SHUTDOWN
|
Equivalent to NetWare Server Console DOWN command.
Note: Any open files on the Server are automatically closed without prompting. |
||||||||||
SLEEP
{##}
|
Silently suspend batch processing for {##} seconds. | ||||||||||
SYSENV GET {Dynamic Variable} {string}
|
GET retrieves the value for the
NetWare System Environment variable
matching {string} and stores it in
(Dynamic Variable}.
PUT stores {string} in the
NetWare System Environment table.
Notes:
|
||||||||||
TOCALENDAR
{Dynamic Variable}
{day}
|
Converts numeric day (%NDAY_OF_YEAR% or 1 - 366 or 001 - 366)
to corresponding calendar date format (yyyymmdd).
// Convert first day of year to calendar and store in Defined Variable %0
(After: %0 = 20040101) during 2004
// Convert 60th day of year to calendar and store in Defined Variable %1
(After: %1 = 20040229) during 2004
// Set Defined Variable %2 to today's numeric day of year plus 7 days
Note:
|
||||||||||
TODAYOFYEAR
{Dynamic Variable}
{date}
|
Converts calendar date (yyyymmdd or mmdd) to corresponding numeric
day (%NDAY_OF_YEAR%).
// Convert 14 February (any year) to numeric day of year
then store the result in Defined Variable %0
(After: %0 = 045)
// Convert 01 March 2003 to numeric day of year
then store the result in Defined Variable %1
(After: %1 = 060)
// Convert 01 March 2004 to numeric day of year
then store the result in Defined Variable %2
(After: %2 = 061) {2004 was a leap year}
Note:
|
||||||||||
TOLOWER
{Dynamic Variable}
|
Convert any alpha chars in the specified Dynamic Variable to lower case. | ||||||||||
TOUPPER
{Dynamic Variable}
|
Convert any alpha chars in the specified Dynamic Variable to upper case. | ||||||||||
VARALIAS
{Dynamic Variable}
{alias}
|
Assign an alias (rename) a defined Dynamic Variable
(i.e., create an alias reference to the variable).
// Assign the alias name %COUNTER% to the reserved Dynamic Variable %0
// Assign an alias name (%NUMBER_9%) to replace the default
defined Dynamic Variable name %VAR09%
// Rename the Alias Variable %NUMBER_9% to %NUMBER_NINE%
// Restore default name %VAR09% to the Aliased Variable %NUMBER_NINE%
Notes: %VAR00% - %VAR99% are default names assigned to the 100 Defined Variables available to each task, each of which can be aliased or renamed to more appropriate references. The first specification must be a valid a Dynamic Variable. The second specification must be a valid and unique alias name. Renaming (or aliasing) a variable does not affect its contents. Once aliased, the previous name is not longer valid (except for the reserved names %0-%9). Naming rules: Must begin and end with a percent sign (%); First character after initial percent sign (%) cannot be numeric (0-9); Maximum of 15 characters, including percent signs (%); Alias names cannot contain spaces. |
||||||||||
WAIT
{##}
|
Suspend batch processing for {##} seconds with countdown message. | ||||||||||
WRITE
[opt]
[#n]
[string]
|
Writes string to the OPEN WRITE [#n] file including trailing
EOL (End Of Line - CR/LF).
Notes:
The ERRORLEVEL condition is set TRUE if a
|
||||||||||
|
Conditional Structures
Used with Conditional Tests to direct the logic flow for intelligent processing. |
|||||||||||
| Command Syntax | Comments / Examples | ||||||||||
IF [NOT] {cond} [GOTO {label}]
|
// Check if current task (System Environment Variable %TASK%)
is already active
IF ACTIVE_TASK %TASK% THEN EXIT
// Check if today is New Years Day (01/01 -
System Environment Variables %MONTH% & %DAY%)
// Send hourly messages to employees (nested IF structyre example)
Notes:
IF / ELSEIF conditions are evaluated sequentially (in order).
Supports multiple AND|OR logic (cannot mix AND/OR) & multiple ELSEIFs.
Variables used for
|
||||||||||
WHILE
|
// Set (DEFINE) Defined Variable %0 to 00 (zero - 2 fixed digit size)
DEFINE %0 00
// Increment Defined Variable %0 (0) by 1 until 10 (00 - 10 retains 2 fixed digit format)
WHILE %0<10
// Decrement Defined Variable %0 (10) by 1 until 00 (10 - 00 retains 2 fixed digit format)
Notes:
Nested WHILE & IF support.
BREAK aborts.
CONTINUE resumes at top.
Multiple AND | OR logic (cannot mix AND / OR tests).
Variables used for
|
||||||||||
|
Conditional Tests
Usage: IF [NOT] {cond} THEN ..., IF [NOT] {cond} ... [ELSEIF [NOT] {cond} ...] [ELSE ...] ENDIF, & WHILE [[NOT] cond] ... LOOP Returns TRUE or FALSE condition based upon the results of the test. |
|||||||||||
| Command Syntax | Comments / Examples | ||||||||||
==
|
EQUAL:
ASCII hex compare by character and for length.
|
||||||||||
>
|
GREATER:
ASCII hex compare by character and for length.
|
||||||||||
<
|
LESS:
ASCII hex compare by character and for length.
|
||||||||||
>=
|
GREATER OR EQUAL:
ASCII hex compare by character and for length.
(GREATER > and EQUAL == examples apply).
|
||||||||||
<=
|
LESS OR EQUAL:
ASCII hex compare by character and for length.
(LESS < and EQUAL == examples apply).
|
||||||||||
ACTIVE_TASK
[server/]{task}
|
Check if task is active (running) on local / remote Server.
Notes: Wild cards supported. server only required for Remote Server checks.
Excludes task issuing check (on local Server).
|
||||||||||
CONSOLE_LOCKED
|
Verifies the lock status of the actively displayed Server Console screen.
Note: Locked screens cannot be changed without first being unlocked. |
||||||||||
CONSOLE_SCREEN
{"screen"}
|
Checks if the name of the actively displayed Server Console screen matches
"screen" (case sensitive match up to length of
"screen").
|
||||||||||
CURRENT_SCREEN
{"screen"}
|
Checks if the name of the current screen against which the active task performs keyin / screen interrogation commands matches "screen" (case sensitive match up to length of "screen"). | ||||||||||
ERRORLEVEL
|
Reports the result (TRUE = Error / FALSE = Success) of the preceding task command line. | ||||||||||
EXIST
[server/][[drive:|vol:]path\]{spec}
|
Confirms existence of a directory / file matching {spec}.
Supports wild cards.
server only required for Remote Server checks.
|
||||||||||
FILE_IN_USE
[server/][[vol:]path\]{spec}
|
Checks if any file matching the specification is in use (open)
on the Server.
Supports wild cards.
server only required for Remote Server checks.
|
||||||||||
LOADED
[server/]{module[.ext]}
|
Checks if any module matching the specification is loaded on the Server.
Note: server only required for Remote Server checks.
CLIB & CLIB.NLM / MPS14 & MPS14.PSM both match, if loaded.
|
||||||||||
LOGGED_IN
{user}
|
Checks if any user matching the specification is logged in to the Server. Supports wild cards. | ||||||||||
MOUNTED
[server/]{vol}
|
Checks if a volume matching the specification is mounted on the Server.
server only required for Remote Server checks.
|
||||||||||
SCAN_FILE
{"string"} {filespec}
|
Scans any file matching the file specification for "string".
Notes: "string" must be enclosed in double quotes ("").
Comparison is case sensitive.
Supports wild cards in the file specification.
|
||||||||||
SCAN_SCREEN
{"string"}
|
Scans the current screen against which the active task performs
keyin / screen interrogation commands
for "string".
Notes: "string" must be enclosed in double quotes ("").
Comparison is case sensitive.
Only supports character (non-GUI) screens.
Use CONSOLE SCREEN / CURRENT SCREEN to change the current task I/O screen.
|
||||||||||
SCAN_STRING
{"substring"} {"string"}
|
Scans "string" for "substring".
Note: Both strings must be enclosed in double quotes (""). Comparison is case sensitive. |
||||||||||
SCREEN_LOCKED
|
Note: Obsolete (supported for backwards compatibility). Replacement: CONSOLE_LOCKED | ||||||||||
|
Dynamic Variables
Dynamic Variables are used to store data in a reusable manner and can be used as a specification in any task command line. |
|||||||||||
| Command Syntax | Comments / Examples | ||||||||||
%alias_name%
|
A name assigned to
a previously Aliased Variable
or
a Defined Variable
to replace the name previously used to reference the variable.
(Refer to
VARALIAS
for more information on and examples of Aliased Variables.)
Naming rules: Must begin and end with a percent sign (%); First character after initial percent sign (%) cannot be numeric (0-9); Maximum of 15 characters, including percent signs (%); Alias names cannot contain spaces. Note: When used within a task, an Aliased Variable is handled by the batch parser exactly the same as its corresponding Defined Variable. |
||||||||||
%0 - %9
|
Data variables specific to each running task in which
alphanumeric string values can be stored and modified.
Note:
%0 - %9 are internally reserved names which correspond to the first 10
data variables (named %VAR00% - %VAR09% respectively, by default).
%VAR00% - %VAR99% are default names for all 100 data variables available
to each task which can be renamed (or aliased) using
VARALIAS.
When used within a task script, the batch parser will automatically
replace any properly referenced variable name with any value stored
in the associated variable.
Upon initial task execution, %0 - %9 are assigned any arguments
(options) which were specified on the TMRUN command line.
Some of the Batch Commands which can be used to assign or modify
the contents of Aliased Variables or Defined Variables include:
|
||||||||||
|
Environment Variables
Environment Variables contain real-time information about the Server which the batch parser automatically substitutes during processing. |
|||||||||||
| Command Syntax | Comments / Examples | ||||||||||
%AM_PM%
|
Substitutes 'am' or 'pm' (based on local 12 hour clock). | ||||||||||
%CACHE_LRU_NUMERIC%
|
Substitutes the current Cache Least Recently Used (LRU) time as a string representing the days, hours, minutes and seconds (000:00:00:00 to 999:23:59:59 - 12 byte fixed length, zero filled). | ||||||||||
%CACHE_LRU_SECS%
|
Substitutes the current Cache Least Recently Used (LRU) time as a numeric value representing the number of seconds (00000000 to 99999999 - 8 digit fixed length). | ||||||||||
%CACHE_LRU_STRING%
|
Substitutes the current Cache Least Recently Used (LRU) time as a string representing the days, hours, minutes and seconds (range '1 secs' to '999 days 23 hrs 59 mins 59 secs' - variable length). | ||||||||||
%CACHE_RATIO%
|
Substitutes the current Cache Buffer ration or percent of Server RAM available for File Cache Buffers (000 to 100 - 3 digit fixed length). | ||||||||||
%CONN_ADDRESS_{spec}%
|
Substitutes the IP/IPX network address for the specified connection.
// Use a specific connection (12)
// Use numeric value defined in %0
Note:
|
||||||||||
%CONN_ID_{spec}%
|
Substitutes the logged in User's Object ID
(same as used for the SYS:MAIL directory)
for the specified connection.
Notes: If NOT-LOGGED-IN or INACTIVE, returns a 0. (Refer to %CONN_ADDRESS_% for usage examples.) |
||||||||||
%CONN_NAME_{spec}%
|
Substitutes the logged in User's Name for the specified connection.
Notes: If not a User connection, returns NOT-LOGGED-IN or INACTIVE. (Refer to %CONN_ADDRESS_% for usage examples.) |
||||||||||
%CONNS_ACTIVE%
|
Substitutes the current active (allocated) connection count
(0000 to 9999 - 4 digit fixed length).
Note: Includes Licensed, Authenticated, NOT-LOGGED-IN, NLM, and remote attachment connections. |
||||||||||
%CONNS_IN_USE%
|
Substitutes the current active (allocated) connections in use count
(0000 to 9999 - 4 digit fixed length).
Note: Includes Licensed, Authenticated, NLM and remote attachment (excludes NOT-LOGGED-IN) connections. |
||||||||||
%CONNS_MAX%
|
Substitutes the maximum number of active connections supported
(0000 to 9999 - 4 digit fixed length).
Note: NetWare v4/v5/v6 returns %CONNS_PEAK% + 1 since the control is by license, not connection, count. |
||||||||||
%CONNS_PEAK%
|
Substitutes the peak number of active connections in use at any time
since the Server was last booted
(0000 to 9999 - 4 digit fixed length).
Note: Includes Licensed, Authenticated, NOT-LOGGED-IN, NLM, and remote attachment connections. |
||||||||||
%CONSOLE_SCREEN%
|
Substitutes the name of the current screen actively displayed on the Server Console. | ||||||||||
%CPU_UTIL%
|
Substitutes the current Server CPU utilization percentage (000 to 100 - 3 digit fixed length). | ||||||||||
%CURRENT_SCREEN%
|
Substitutes the name of the current screen against which the active task performs keyin / screen interrogation commands. | ||||||||||
%CWD%
|
Substitutes the Current Working Directory (CWD) for the active task.
Note: To change the CWD, use the CD / CHDIR Console Command. |
||||||||||
%CX%
|
Substitutes the Directory Services Context for the Server (null string returned for NW v3 and Bindery only Servers). | ||||||||||
%DAY%
|
Substitutes the current day of the month (01 to 31 - 2 digit fixed length). | ||||||||||
%DAY_OF_WEEK%
|
Substitutes the current day of the week (Sunday - Saturday). | ||||||||||
%DIR_FILE_[{spec}]%
|
Substitutes the name of the first/next file matching the initial
specification (required for first pass/use).
// Find first file in Current Working Directory (CWD) matching *.*
// Find next file matching last specified pattern (*.*)
// Find first file matching
// Find next file matching last specified pattern
// Scan Current Working Directory (CWD) Notes: A valid DOS search pattern must be specified in the initial (first) request. Subsequent (next) requests should not include a search pattern (i.e., specifying a pattern initiates a new search). A null string is returned if the search is exhausted or fails. If the initial (first) specification does not include a volume and/or path, the Current Working Directory (CWD) is used. A Dynamic Variable may be used for initial (first) specification, if it is defined as a valid DOS search pattern. Wild cards supported. |
||||||||||
%DIR_SUB_[{spec}]%
|
Substitutes the name of the first/next directory matching the initial
specification (required for first pass/use).
Note: Refer to %DIR_FILE_% for usage examples. |
||||||||||
%DIR_TREE_[{spec}]%
|
Substitutes the name of the first/next subdirectory in the specified
directory (required for first pass/use) and changes the
Current Working Directory (CWD) to correspond to the returned directory,
traversing the directory tree below the initial (first) specification.
// Scan & display a specified directory tree Notes: A valid DOS directory must be specified in the initial (first) request. Subsequent (next) requests should not include a specification (i.e., specifying a directory initiates a new search). A null string is returned if the search is exhausted or fails. The initial (first) specification becomes the base (or root) directory for traversing the tree. A Dynamic Variable may be used for initial (first) specification, if it is defined as a valid DOS directory. Unlike %DIR_SUB_% which only returns a matching directory name, the returned directory also becomes the CWD. |
||||||||||
%DOS_DRIVE_FREE_[?]%
|
Substitutes the amount of free space (MBytes) on the specified or
default (boot) DOS drive
(0000 to 99999999 - 4 to 8 digits variable length).
// Store information for Drive C: in %1
// Store information for the default (boot) drive in %1
Note:
If a DOS drive (A-Z) is not specified for |
||||||||||
%DOS_DRIVE_SIZE_[?]%
|
Substitutes the drive size (MBytes) for the specified or
default (boot) DOS drive
(0000 to 99999999 - 4 to 8 digits variable length).
Note: Refer to %DOS_DRIVE_FREE_% for usage examples. |
||||||||||
%DOS_DRIVE_USED_[?]%
|
Substitutes the space used (MBytes) on the specified or
default (boot) DOS drive
(0000 to 99999999 - 4 to 8 digits variable length).
Note: Refer to %DOS_DRIVE_FREE_% for usage examples. |
||||||||||
%ELAPSED_HOURS%
|
Substitutes the number of hours that the current task has been running (00 to 4294967295 - 2 digits minimum length). | ||||||||||
%ELAPSED_MINS%
|
Substitutes the number of minutes that the current task has been running (00 to 4294967295 - 2 digits minimum length). | ||||||||||
%ELAPSED_SECS%
|
Substitutes the number of seconds that the current task has been running (00 to 4294967295 - 2 digits minimum length). | ||||||||||
%ELAPSED_TIME%
|
Substitutes a text string representing the hours, minutes and seconds that the current task has been running (00:00:00 to 99999:59:59 - minimum length of 8 bytes). | ||||||||||
%FILE_ACCESS_{spec}%
|
Substitutes the date {spec} was last accessed
(yyyy/mm/dd - 10 bytes fixed length).
// Store last access for LOGIN.DAT (located in CWD) in %1
// Store last access for SYS:\PUBLIC\LOGIN.DAT in %1
// Store
// Store file search pattern (*.*) in %0. Notes: {spec} can be fully qualified or relative to the Current Working Directory (CWD) and must reference a valid directory or file. If {spec} does not exist, a null string is returned. If a Dynamic Variable is used for {spec}, it must be defined as a valid directory or file. |
||||||||||
%FILE_ATTRIB_{spec}%
|
Substitutes the NetWare Attributes assigned to {spec}.
Notes: For information on the returned attributes and their order, refer to the CHMOD / FLAG Extended Console Commands. Refer to %FILE_ACCESS_% for usage examples. |
||||||||||
%FILE_CREATE_{spec}%
|
Substitutes the date {spec} was created
(yyyy/mm/dd - 10 bytes fixed length).
Note: Refer to %FILE_ACCESS_% for usage examples. |
||||||||||
%FILE_MODIFIER_{spec}%
|
Substitutes the Object name that last modified {spec}.
Note: Refer to %FILE_ACCESS_% for usage examples. |
||||||||||
%FILE_NAME_DOS_{spec}%
|
Substitutes the full DOS Name Space path
(VOL:\PATH\SPECNAME.EXT)
for {spec}.
Note: Refer to %FILE_ACCESS_% for usage examples. |
||||||||||
%FILE_NAME_LONG_{spec}%
|
Substitutes the full Long Name Space path
(Vol:\Path\SpecName.ext)
for {spec}.
Note: Refer to %FILE_ACCESS_% for usage examples. |
||||||||||
%FILE_NAME_MAC_{spec}%
|
Substitutes the full Macintosh Name Space path
(Vol:Path:SpecName.ext)
for {spec}.
Note: Refer to %FILE_ACCESS_% for usage examples. |
||||||||||
%FILE_NAME_NFS_{spec}%
|
Substitutes the full NFS Name Space path
(Vol:/Path/SpecName.ext)
for {spec}.
Note: Refer to %FILE_ACCESS_% for usage examples. |
||||||||||
%FILE_OWNER_{spec}%
|
Substitutes the Object name assigned as Owner of {spec}.
Note: Refer to %FILE_ACCESS_% for usage examples. |
||||||||||
%FILE_SIZE_{spec}%
|
Substitutes the size of {spec}
(0000000000 to 4294967295 - 10 digits fixed).
Notes: Subdirectories return a size of 0. Refer to %FILE_ACCESS_% for usage examples. |
||||||||||
%FILE_UPDATE_{spec}%
|
Substitutes the date {spec} was updated (modified) last
(yyyy/mm/dd - 10 bytes fixed length).
Note: Refer to %FILE_ACCESS_% for usage examples. |
||||||||||
%HOUR%
|
Substitutes the current 12 hour format (01 to 12 - 2 digit fixed length) | ||||||||||
%HOUR24%
|
Substitutes the current 24 hour format (00 to 23 - 2 digit fixed length) | ||||||||||
%LICENSES_IN_USE%
|
Substitutes the current number of licenses in use (0000 to 9999 - 4 digit fixed length). | ||||||||||
%LICENSES_MAX%
|
Substitutes the maximum number of licenses supported (0000 to 9999 - 4 digit fixed length). | ||||||||||
%LICENSES_PEAK%
|
Substitutes the peak number of licenses in use since the Server was booted (0000 to 9999 - 4 digit fixed length). | ||||||||||
%MINUTE%
|
Substitutes the current minute (00 to 59 - 2 digit fixed length). | ||||||||||
%MONTH%
|
Substitutes the current month number (01 to 12 - 2 digit fixed length) | ||||||||||
%MONTH_NAME%
|
Substitutes the current month name (January to December). | ||||||||||
%NDAY_OF_WEEK%
|
Substitutes a number corresponding to the current week day (1 [Sunday] to 7 [Saturday] - 1 digit fixed length). | ||||||||||
%NDAY_OF_YEAR%
|
Substitutes the current Julian day number in the year (001 to 365 [366 in Leap Years] - 3 digit fixed length). | ||||||||||
%NW_SUBVERSION%
|
Substitutes the minor version of the NetWare OS in use (00 to 99 - 2 digit fixed length). | ||||||||||
%NW_SUPPORTPACK%
|
Substitutes the NetWare Support Pack level (returns SP#, # is the level).
Note: NetWare v5+ only (NetWare v3/v4 returns a null string). |
||||||||||
%NW_VERSION%
|
Substitutes the major version of the NetWare OS in use (0 to 9 - 1 digit fixed length). | ||||||||||
%PATH%
|
Substitutes the path, excluding the volume name, of the Current Working
Directory (CWD).
Note: SYS:\ -> <null> (no path) SYS:\SYSTEM -> \SYSTEM |
||||||||||
%RECV_BUFFS_IN_USE%
|
Substitutes the number of Packet Receive Buffers (PRBs) allocated by NetWare (0 to 4294967295 - variable length). | ||||||||||
%RECV_BUFFS_MAX%
|
Substitutes the maximum number of Packet Receive Buffers (PRBs) which can be allocated by NetWare (0 to 4294967295 - variable length). | ||||||||||
%SCREEN_NAME%
|
Note: Obsolete (supported for backwards compatibility). Replacement: %CONSOLE_SCREEN% | ||||||||||
%SECOND%
|
Substitutes the current second (00 to 59 - 2 digits fixed length). | ||||||||||
%SERVER%
|
Substitutes the name of the Server. | ||||||||||
%SERVER_NET%
|
Substitutes the Server IPX Internal Network address, if defined (hex value in ASCII format - 8 byte fixed length). | ||||||||||
%TASK%
|
Substitutes the file name (filename.ext) for the active Task. | ||||||||||
%TASK_EXT%
|
Substitutes the extension (no path or file name) for the active Task. | ||||||||||
%TASK_FILE%
|
Substitutes the file name (no path or extension) for the active Task. | ||||||||||
%TASK_LINE_NUM%
|
Substitutes the line number where located within the active Task. | ||||||||||
%TASK_NAME%
|
Substitutes the full name (vol:\path\filename.ext) for the active Task. | ||||||||||
%TASK_PATH%
|
Substitutes the path (vol:[\path]) for the active Task. | ||||||||||
%TASK_SCREEN%
|
Substitutes the name of the screen created to receive the default I/O, as well as error messages, for the active task. | ||||||||||
%TEMP_NAME%
|
Substitutes a unique temporary NetWare file name (in the format of _TM?????.TMP, where the ?'s are replaced with an ASCII representation of a unique decimal number; e.g., _TM01234.TMP). | ||||||||||
%TM_REVISION%
|
Substitutes the revision level of the TaskMaster module in use (a to z or null - 1 byte max length). | ||||||||||
%TM_SUBVERSION%
|
Substitutes the minor version of the TaskMaster module in use (01 to 99 - 2 digits fixed length). | ||||||||||
%TM_VERSION%
|
Substitutes the major version of the TaskMaster module in use. | ||||||||||
%TREE%
|
Substitutes the Directory Services Tree name in which the Server is located (null string returned for NW v3 and Bindery only Servers). | ||||||||||
%UPTIME_NUMERIC%
|
Substitutes the current Server Up Time as a numeric string representing the days, hours, minutes and seconds (000:00:00:00 to 999:23:59:59 - fixed length, zero filled). | ||||||||||
%UPTIME_STRING%
|
Substitutes the current current Server Up Time as a text string representing the days, hours, minutes and seconds ('1 secs' to '999 days 23 hrs 59 mins 59 secs' - variable length). | ||||||||||
%VOL_FREE%
|
Substitutes the percentage of available space on the volume associated with the Current Working Directory (CWD), including space which is purgeable (000 to 100 - 3 digits fixed length). | ||||||||||
%VOL_NAME%
|
Substitutes the volume name (VOL:) associated with the Current Working Directory (CWD). | ||||||||||
%VOL_PURGEABLE%
|
Substitutes the percentage of purgeable space on the volume associated with the Current Working Directory (CWD) (000 to 100 - 3 digits fixed length). | ||||||||||
%VOL_SIZE%
|
Substitutes the size (MBytes) of the volume associated with the Current Working Directory (CWD) (00000000 to 99999999 - 8 digits fixed length). | ||||||||||
%VOL_USED%
|
Substitutes the percentage of used space on the volume associated with the Current Working Directory (CWD) (000 to 100 - 3 digits fixed length). | ||||||||||
%YEAR%
|
Substitutes the current year (1900 to 2100 - 4 digits fixed length). | ||||||||||