EasyManua.ls Logo

Commodore Plus 4 - Page 346

Commodore Plus 4
464 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...
334
Using
Peripheral
Devices
Validating
a
Diskette
Whenever
a
file
is
added
to
a
diskette,
the
DOS
updates
the directory
and
the
BAM.
Occasionally
the
two
do
not
match,
when,
for
example,
a
file
was
opened
but
never
closed.
The
COLLECT
or
validate
command
must
be
used
to
remedy
this
situation.
Never
SCRATCH
an
unclosed
file.
(Unclosed
files
are
denoted
with
an
asterisk
in
the
directory
listing.)
Do
not
COLLECT
a
diskette
that
has
had
sectors
written
to
it
with
the
direct-access
commands
described
in
the
next
section.
The
COLLECT
command
syntax
is
COLLECT
Ddrive,
ON
Uunit
;
where
drive
is
the
optional
drive
number
(which
is
not
needed
for
the
1541)
and
unit
is
the
disk
drive's
device
number.
If
omitted,
the
unit
is
assumed
to
be
8.
To
collect
a
diskette
by
direct
command
to
the
DOS,
use
PRINT#
filenumber,"V"
where
filenumber
is
the
logical
file
number
of
the
previously
opened
command
channel.
Deleting
Files
on
a
Diskette
To
delete
a
properly
closed
file
from
the
diskette,
the
SCRATCH
command
is
used.
Its
syntax
is
SCRATCH
filename,'Ddrive,'Uviiit
where
filename
is
the
name
of
the
file
to
be
deleted,
drive
is
the
optional
drive
number
(which
is
not
needed
on
the
1541),
and
unit
is
the
disk
drive's
device
number,
which
is
assumed
to
be
8
if
not
specified.
Do
not
SCRATCH
an
unclosed
file.
Instead,
use
the
COLLECT
command
described
previously.
Wild
cards
may
be
used
in
the
file
name
for
a
SCRATCH
to
delete
every
file
with
a
matching
file
name,
but
caution
is
advised
because
one can
easily
delete
large
numbers
of
files
by
using
them.
To
delete
a
file
by
direct
command
to
the
DOS,
use
PRI1TT#
filenumber,"S:filename"
where
filenumber
is
the
logical
file
number
of
the
previously
opened
command
channel
and
filename
is
the
name
of
the
file
to
be
deleted.
Note:
If
you
inadvertently
SCRATCH
a
valuable
file,
you
may
be
able
to
recover
it.
For
more
information,
see
the
direct-access
programming
section.