Paxar Gold 6037EX Printer User Manual


 
ROM-DOS Internal Commands 4-65
SHIFT
Batch File, Internal Command
The SHIFT command moves each replaceable parameter for a batch file
one position to the left. Execution of the SHIFT command allows use of
more replaceable parameters in a batch file beyond the standard set of
%0 through %9.
Syntax
SHIFT
Remarks
This command moves the string or value stored for each replaceable
parameter one position to the left. Upon execution of SHIFT, the %0
argument assumes the value of the %1 argument, the %1 argument then
assumes the value of the %2 argument, and so on.
Example
The following batch file reads in a list of files (provided as arguments on
the command line) and displays each one to the screen. After displaying
each one, the SHIFT command copies the next file in the argument list
into the %1 slot, verifying the existence of the file, and continues.
Command line argument:
TYPEIT autoexec.bat config.sys net.bat
TYPEIT.BAT batch file:
:repeat
if EXIST %1 goto doit
goto end
:doit
type %1
pause
shift
goto repeat
:end
@echo All Done