2.5
File Management Commands:
DEL
(ERASE)
Type: Internal
Syntax: DEL (ERASE)
[d:][path]filename [/P]
Purpose: Deletes (erases)
files from disk.
Discussion
You
can
use
wildcard
characters
(?
and
*)
to
delete
groups
of
files.
If
you
don’t
specify
a
pathname,
the
program
assumes
the
files
to
be
deleted
are
on
the
drive
and
directory
you
are
currently
using.
The
/P
option
prompts
you
to
enter
a Y
or N
for
each
file
selected
for
deletion.
CAUTION
Be careful
when you use this command with wildcard characters: groups of files can be
erased with one command entry. For example, if you enter del c*.*
All files in the current
directory that begin with the letter C will be immediately erased.
Examples
To erase the file CHAP.DOC from
the CHAPTERS directory on the diskette in drive D, enter
del
d:\chapters\chap.doc
To erase all the files in the
current directory, enter
del *.*
If you use this form of the command
(to delete all files in a directory), the program will display the prompt
Are you sure (Y/N)?
If you are
sure you are deleting the files you want to delete, press the letter Y
key to start the erasing process.
RENAME
(REN)
Type: Internal
Syntax: RENAME
(REN)
[d:][path]filename filename
Purpose: Changes the
filename under which a file is stored.
Discussion
RENAME changes
the name of the first filename you enter to the second filename you enter. If
you enter a path designation for the first filename, the renamed file will be
stored on that same path.
Wildcard
characters (* or ?) may be used with either the first or second filename
designation.
Examples
To change the name of the file
CHAP.DOC on drive A to CHAP1.DOC on drive C, enter
ren ca:chap.doc chap1.doc
To
change
the
filename
extensions
to
DOC
on
all
files
on
drive
D
that
have
CHAP
as
the
first
four
characters
of
the
main
filename,
enter ren
d:chap*.*
chap.doc*.doc
|