EasyManua.ls Logo

Commodore PC 40 - How to Run a Batch File

Commodore PC 40
494 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...
How to
Run
a Batch File
To
run
the
batch file sorter. bat, type
the
batch filename followed
by
the
parameters that
you
want
MS-DOS
to
substitute for % 1, %2,
and
%3.
Suppose that
on
the
disk in drive A you have a file that lists
your
customers'
names and regions.
The
file might look
something
like
this:
Shores,
Sandy
Poster,
Emily
Sharpe,
Isabel.R.
Fisher,
Pete
Conrad,
Betty
Rey,
Fernando
Shaw,
Rick
Moss,
Chris
north
south
north
east
south
north
west
north
If
you
want
to
print an alphabetical list
of
the
customers
in
the
north, you can run
the
sorter batch file,
with
the
appropriate
parameters, by typing
the
following
command
and
then
pressing
RETURN:
sorter
north
a:customer
temp.fil
The
output
on
the
printer
should look like this:
Moss,
Chris
Rey,
Fernando
Sharpe,
I
sabel
R.
Shores,
Sandy
north
north
north
north
The
following table shows
how
MSĀ·
DOS replaces
each
of
the
parameters
in
the
previous example:
Batch
filename
Parameter1
Parameter2
Parameter3
( % 0 )
( % 1 )
(%2)
(%3)
sorter
north
a:customer
temp.fil
The
result
is
the
same as
if
you
had
typed
each
of
the
commands
in sorter with its parameters, as follows:
type
a:customer
:
find
"north"
>
temp.fil
type
temp.fil
:
sort>
prn
del
temp.fil
Using
the
batch file, however, saves typing time and is
much
easier
to
remember.
Batch Processing
1071
Running a batch file

Table of Contents

Related product manuals