home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
computpc
/
compv3n2.arc
/
ERA.DOC
< prev
next >
Wrap
Text File
|
1988-11-18
|
4KB
|
157 lines
ERA
A Replacement for the DEL Command
27 Aug 88
Program by Dennis Vallianos
Notes by Irv Hoff
ERA.COM is an MS-DOS "delete file(s)" program. Unlike the normal DEL
command, it shows the names of the files that will be deleted, then
asks if you really want to erase them.
If a 'c' (for confirm) is appended to the command line, ERA will display
the files matching the command line individually, then ask if you really
want to erase each file.
HOW TO USE ERA
First, copy ERA.COM to a directory that is in your current PATH statement.
ERA does not accept drive specifications, and will only work in the
current drive and directory. If it is in a directory named in your PATH
statement, you can use it in any directory. Floppy disk users should
copy ERA.COM to their normal DOS disk.
You can use ERA by entering one of the following commands. Notice the
wildcard filename. Use *.* to indicate all files in the current
directory.
1. ERA *.TXT
2. ERA *.TXT C
The first example is for normal use. It shows the names of
all files with a .TXT extent, then asks if it's OK to erase
those files.
The second example shows the files one-at-a-time and asks
if you want to erase each file.
(See below for an actual example)
This very short (636 bytes) program has the tremendous advantage of
allowing the user to SEE what will be erased and then verifying
the command before erasing the files. This is a terrific advantage over
the usual DEL command.
EXAMPLE of its usefulness:
--------------------------
Recently I erased the entire UTIL directory of some 123 files,
when I "thought" I was in another subdirectory where I did
want to erase the entire contents (all three files). I gave the
command:
DEL *.*
THEN discovered I was in UTIL and those files were GONE.
Fortunately, I had a back up that was reasonably current,
but what a nuisance!
INSTALLING ERA.COM
-------------------
Just copy ERA.COM into in your UTIL or DOS directory.
Make sure the directory chosen is in your PATH
statement. Now, instead of entering DEL to delete a
file, just enter ERA instead. If you enter DEL, you
can still use the original DOS command.
DEMO of ERA
-----------
Let's take a look at a simulated session with ERA. For the purposes
of this simulation, assume there is a directory, named \UU on drive C:.
Read along, pretending that you are entering the commands shown.
Remember, ERA.COM must be in a directory contained in your PATH statement.
C:\UU>dir
Volume in drive C has no label
Directory of C:\UU
ABIWI TXT 636 8-27-88 4:44p
BIW33I TXT 636 8-27-88 4:44p
AGIWI8SK TXT 636 8-27-88 4:44p
A238BDL TXT 636 8-27-88 4:44p
A82CKSW TXT 636 8-27-88 4:44p
AIBIS TXT 636 8-27-88 4:44p
6 File(s) 11857920 bytes free
C:\UU>era *.TXT
ABIWI .TXT BIW33I .TXT SGIWI8SK.TXT A238BDL .TXT A82CKSW .TXT
AIBIS .TXT
Ok to erase? y
C:\UU>
C:\UU>era *.txt c
Press Y to delete, N to skip, ESC to stop.
Delete ABIWI .TXT? No
Delete BIW33I .TXT? Yes
Delete SGIWI8SK.TXT? Yes
Delete A238BDL .TXT? Yes
Delete A82CKSW .TXT? No
Delete AIBIS .TXT? Yes
No more matching files.
C:\UU>dir *.txt <<-- (just to show what's left)
Volume in drive C has no label
Directory of C:\UU
ABIWI TXT 636 8-27-88 4:44p
A82CKSW TXT 636 8-27-88 4:44p
2 File(s) 11866112 bytes free
C:\UU>era *.txt <<-- normal use of ERA
ABIWI .TXT A82CKSW .TXT
Ok to erase?y
C:\UU>dir *.txt
Volume in drive C has no label
Directory of C:\UU
File not found
C:\UU>