R
Ronald Fischer
My Batch-File is supposed to work like this:
Invocation (variable parameter list):
MYBATCH.CMD FOO BAR P1 P2 P3....
Execution
(1) Execute MYBATCH_HELPER.CMD FOO
(2) Execute BAR P1 P2 P3 ....
How do I write this batch program? My first attempt went like this:
REM This MYBATCH.CMD does not work
MYBATCH_HELPER.CMD %1
SHIFT /1
%*
But this does not work, because %* always gets substituted by all
original parameters, ignoring the effect of any previous SHIFT.
Of course I could write it like this:
REM This MYBATCH.CMD works halfways
MYBATCH_HELPER.CMD %1
SHIFT /1
%1 %2 %3 %4 %5 %6 %7 %8 %9
But this is not really a variable parameter list, because there
can only be actual parameters P1 ... P8.
Any better solution to this?
Ronald
Invocation (variable parameter list):
MYBATCH.CMD FOO BAR P1 P2 P3....
Execution
(1) Execute MYBATCH_HELPER.CMD FOO
(2) Execute BAR P1 P2 P3 ....
How do I write this batch program? My first attempt went like this:
REM This MYBATCH.CMD does not work
MYBATCH_HELPER.CMD %1
SHIFT /1
%*
But this does not work, because %* always gets substituted by all
original parameters, ignoring the effect of any previous SHIFT.
Of course I could write it like this:
REM This MYBATCH.CMD works halfways
MYBATCH_HELPER.CMD %1
SHIFT /1
%1 %2 %3 %4 %5 %6 %7 %8 %9
But this is not really a variable parameter list, because there
can only be actual parameters P1 ... P8.
Any better solution to this?
Ronald