Script-Related Constructs

:label

The named location within the script (target of the goto or call command).

%m

The argument number m. (Access arguments above the ninth one via the shift command.)

%~cm

The modified argument m, where c can be one or more of the following code letters, which indicate the parts of the argument to use:

f:

Full pathname.

d:

Drive letter only.

p:

Path only.

n:

Filename only.

x:

Extension only.

s:

Use 8.3 names (valid with n and x).

$PATH:

Examines the search path in the PATH environment variable and returns the fully qualified pathname for the first match for the argument. Returns an empty string if the item is not found.

%*

Corresponds to all command parameters.

%var %

Value of variable var (local or environment).

errorlevel

An internal variable set by various commands that often indicates contents of user input (see the discussion of the if command in the next section).

Get Windows 2000 Commands Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.