Shift Ü
ßßßßßß
Changes the position of replaceable parameters in a batch file.
Syntax: SHIFT
How the shift command works
Shift changes the values of the replaceable parameters %0 through %9,
by copying each parameter into the previous one. In other words, the
value of %1 is copied to %0, the value %2 is copied to %1, and so on.
Working with more than 10 command-line paramters
You can also use shift to create a batch file that can accept more than
10 parameters. If you specify more than 10 parameters on the command
line, those that appear after the tenth (%9) will be shifted one at a
time into %9.
Example:
{ File jcopy.bat }
@ECHO OFF
rem This copies any number of files to a directory.
rem The command copies this syntax:
rem jcopy dir file1 file2 ...
set todir=%1
:getfile
shift
if "%1"=="" goto end
copy %1 %todir%
goto getfile
:end
set todir=
echo All Done...