Contents of the DELBUT2.DOC file
DELBUT V 2.1(minor fix)by J.E. Arkay 6/07/88
Deletes all but a given filespec in one directory. Useful for managing your
*** TESTED, BUT NOT VERY MUCH *** *** TRY IT ON A SCRATCH DISK FIRST ***
It will not delete a Hidden or Read-Only file; it can delete itself.
Its use of wildcards is now just like DOS (which sucks, but won't surprise you):
DELBUT ?????.?? matches ABCDE.12 and ABCD.12 and ABC.1 but not ABCD.123
For example, on our AT clone with extended memory, we use a DOS shell that runs
faster from a RAM disk. When we start AutoCAD or copy a 1.2 Meg floppy, we use
DELBUT in a batch file to erase the RAM disk except for the DOS shell.
You can use it in a batch file where DEL *.* would give its 'Y/N' message and
require a keypress. Example to DEL D:\MY-DIR\*.*:
create a 1-byte file named X (DOS won't copy a zero-byte file)
COPY X D:\MY-DIR
It returns Errorlevel=1 if nothing is deleted or an error occurs.
For instructions, TYPE or edit the .COM file or run it with no command line.