EasyManua.ls Logo

Commodore PC - Page 188

Commodore PC
414 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
116
MS-DOS
User's
Reference
u
Shift
Shift
I
Purpose:
*w
Lets
you
change
the
position
of
replaceable
parameters
in
batch
file
processing.
;
\
Syntax:
shift
,
,
Comments:
You
can
use
the
shift
command
to
change
the
positions
of
»
(replaceable)
command
line
parameters.
v-/
Usually
command
files
are
limited
to
handling
ten
parameters,
%0
through
%9.
But
by
using
shift,
you
can
access
more
than
ten
, ,
parameters.
This
means
that
if
there
are
more
than
ten
parameters
v-'
given
on
a
command
line,
those
that
appear
after
the
tenth
(%9)
will
be
shifted
one
at
a
time
into
%9-
You
can
use
the
shift
command
even
if
you
have
less
than
ten
^—^
parameters.
Warning
There
is
no
backward
shift
command.
Once
you
have
executed
shift,
you
cannot
recover
the
first
parameter
(%0)
that
existed
before
the
shift.
i
j
Example:
Shifting
replaceable
The
following
file
mycopy.bat
shows
how
to
use
the
shift
com-
^-^
parameters
mand
with
any
number
of
parameters.
It
copies
a
list
of
files
to
a
specific
directory.
,
rem
mycopy.bat
copies
rem
any
number
of
files
rem
to
a
directory.
i \
rem
The
command
is
^-^
rem
mycopy
dir
files
:one
if
"%1"
=
"
M
goto
two
U
set
todir
=
%1
shift
copy
%1
%todir%
;
,
goto
one
\-J
:
two
set
todi
r
=
echo
Al1
done
i
)
U

Related product manuals