(05-15-1995 9:07am FORLOOP.EXE)
FORLOOP - (C) Copyright Glenn B. Lawler, 1995. All Rights Reserved.
Usage: [options] "CommandLine % RemainingLine"
Command to be executed is entered on the command line
quoted with either double or single quote marks.
A % may be included in the command to indicate the position
where N is to be inserted in the command.
The command is executed for each N.
FORLOOP searches for an executable in the same way as DOS,
starting with the current directory and each directory in the
PATH environment variable. If the executable (.COM or .EXE) is
found, FORLOOP runs the program directly. If not found, or a BAT,
FORLOOP runs COMMAND.COM with a /C option to execute the command.
When FORLOOP echos commands run through COMMAND.COM, they are
preceeded with >. The /E option will not work for commands
executed through COMMAND.COM, since COMMAND.COM hides the ERRORCODE.
- More - Hit a key
/Fn specifies the initial value of the counter (default: 1)
/Ln specifies the last value of the counter (default: 0)
/Sn specifies the step value of the counter (default: 1)
/Q option suppresses echoing of the command.
/E exit if errorlevel is set, & set a matching errorlevel.
/Zn Pad left with zeros to a width of n
FORLOOP /L10 "COPY % A:" (copies files named 1 through 10 to A:)
FORLOOP /L10 /F2 /S2 "COPY % A:" (copies even files 2-10)