The limit of 10 parameters for a batch file can be raised through use of the SHIFT
command. The syntax is the single word:
command. The syntax is the single word:
When that sub command is encountered, all parameter/marker pairings are shifted one to the
left. Whatever was assigned to %0 is lost, the contents of %1 are moved to %0, %2 moves to %1 ...
%9 moves to %8 and a new parameter from the command line is moved into %9.
While this brings in a new parameter, all have shifted and you must anticipate the effect on your
batch file "program."
The effect of SHIFT:
left. Whatever was assigned to %0 is lost, the contents of %1 are moved to %0, %2 moves to %1 ...
%9 moves to %8 and a new parameter from the command line is moved into %9.
While this brings in a new parameter, all have shifted and you must anticipate the effect on your
batch file "program."
The effect of SHIFT:
Remember, this command seems very simple, but its effects are far ranging and the logical
consequence of mismatching parameters and markers and be disastrous!
consequence of mismatching parameters and markers and be disastrous!
No comments:
Post a Comment