EasyManua.ls Logo

Commodore PC - Page 174

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...
102
MS-DOS
User's
Reference
Creating
a
batch
file
Running
a
batch
file
Suppose,
for
example,
that
you
want
to
create
a
batch
file
to
format
and
check
a
new
disk.
To
do
this
you
simply
follow
these
steps:
E
First,
type
the
following:
copy
con
checknew.bat
Press
return.
This
command
tells
ms-dos
to
copy
the
informa
tion
from
the
console
(keyboard)
to
the
file
checknew.bat.
[H
Next,
type
the following
lines,
pressing
return
after
each:
rem
This
is
a
file
to
format
and
rem
check
new
disks.
rem
It
is
named
CHECKNEW.BAT.
pause
Insert
new
disk
in
drive
B:
format
b:
/v
chkdsk
b:
H]
After
the
last
line,
press
control-z
and
then
press
return
to
save
the
batch
file,
ms-dos
displays
the
message
"1
File(s)
copied"
to
show
that
it
created
the
file.
H
Now,
to
execute
the
file,
simply
type
the
following
command:
chec
knew
U
U
u
o
u
The
result
is
the
same
as
if
the
lines in
the
.bat
file
were
entered
from
the
keyboard
as
individual
commands.
About
Batch
Processing
Here
are
a
few
things
you
should
know
before
you
run
a
batch
process
with
ms-dos:
You
must
name
each
batch
file
with
an
extension
of
.bat.
To
execute
a
batch
file,
you
type
only
its
filename
and
not
the
extension.
If
you
press
control-c
while
the
batch
file
is
running,
ms-dos
asks
you
to
confirm
that
you
want
to
terminate
the
batch
process.
If
you
remove
the
disk
that
contains
a
batch
file
being
run,
ms-
dos
prompts
you
to
reinsert
the
disk
so
that
it
can
continue
processing
the
file.
You
can
specify
the
name
of
another
batch
file
as
the
last
com
mand
in
a
batch
file.
This
feature
allows
you
to
call
one
batch
file
from
another
when
the
first
has
finished.
u
u
u

Related product manuals