I have seen the usage of %*
in batch files and command lines.
Can someone explain the typical usage of %*
with an example?
One important point not listed in any of the previous answers: %*
expands to all parameters from the command line, even after a SHIFT
operation.
Normally a SHIFT
will move parameter %2
to %1
, %3
to %2
, etc., and %1
is no longer available. But %*
ignores any SHIFT
, so the complete parameter list is always available. This can be both a blessing and a curse.