128
MS-DOS User's Guide
Deleting a file
copy
a:sales.doc
b:sales.doc
copy
sales.doc
b:sales.doc
copy
sales.doc
b:
The Del Command
Just
as you may
need
to
make copies
of
files, you may also
need
to
remove
old
or
unnecessary files
to
clean
up
your
file system.
So
when
you
want
to
erase a file from a disk, you
can
use
the
MS-DOS
del
command. Remember, though,
that
the
del
command
permanently
erases
the
file. To
delete
an
old
sales. doc file from
the
disk in drive
B,
at
the
MS-DOS
prompt
you
would
use
the
following command:
del
b:sales.doc
IDelete a file
...
l.
..
named "sales.doc" from the disk in drive
B.
Example
Suppose you have an
old
copy
of
the
sales.doc file
that
you
no
longer need. To
delete
this file from
the
disk in
the
default drive,
you
would
just follow these steps:
III Make
sure
that
the
disk
with
the
sales. doc file is in
the
default
drive.
rn
At
the
MS-DOS
prompt,
type
the
following command:
del
sales.doc
rn
Press
the
RETURN
key.
MS-DOS
then
deletes
the
sales.doc file
from
the
disk.
Note
• To
MS-DOS,
the
wildcard name •.• means
all
files
in
a direc-
tory,
so
be
careful
when
you use this abbreviation in
your
commands. For example,
if
you type
the
del
command, fol-
lowed by
* .• ,
MS-DOS
asks
if
you
want
to
delete
all
the
files in
the
directory;
if
you
then
press
Y,
(for
Yes)
MS-DOS
permanently
deletes
the
files in the directory.
•
The
del
command
does
not
work
if
you
type
the
word
"delete." You can, however, type "erase" instead
of
"deL"