EasyManua.ls Logo

Tandy 1000 MS-DOS - Chapter 6 COMMAND REFERENCE

Default Icon
392 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...
Chapter 4 / Batch Files
To
use
this
file to format
the
Drive B disk,
enter
the
batch
file
name
and
the
drive specification to replace
%1,
as shown here:
pre
p
dis
k
b:
[ENTER
I
The next two sections tell more
about
creating
and
executing
batch
files
that
have
dummy
parameters.
Creating
a
Batch
File
With
Replaceable
Parameters
The
dummy
parameters
are
%0
through
%9.
MS-DOS always
replaces
the
%0
parameter
with
the
filename of
the
batch
file,
unless
you
use
the
SHIFT
command.
It
replaces
the
other
dummy
parameters,
sequentially,
with
the
parameters
you spec-
ify when you execute
the
batch
file. (See
the
SHIFT command
in
Part
2
if
you wish to specify more
than
ten
dummy
parameters.)
These
parameters
may
be
pathnames,
drive
specifications,
numeric values, or
almost
anything
else. For example,
if
you
type:
copy
con
myfile.bat
[ENTERI
copy
%1.mac %2.mac
[ENTERI
type
%2.
mac
[ENTER
I
t Y P e %0
bat
I
ENTER
I
ill]
[
ENTER
I
MS-DOS
creates
the
batch
file myfile.bat
in
the
current
direc-
tory
and
stores
the
next
three
lines
in
that
file.
When you execute
the
file,
the
parameters
%1
and
%2
are
replaced sequentially by
the
pathnames
you supply.
Executing
a
Batch
File
With
Replaceable
Parameters
To
execute a
batch
file
that
has
replaceable
parameters,
enter
the
batch
filespec (without
its
extension), followed by
the
param-
eters
to replace
the
dummy
parameters.
For example, to execute
myfile.bat, type:
myf
i
le
a:
prog1
b:
prog2
[ENTER
I
myfile is
substituted
for %0, A:prog1
for
%1,
and
B:prog2
for
%2.
25

Table of Contents

Related product manuals