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).
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access