Site hosted by Angelfire.com: Build your free website today!

Delete Files Recursively

The following DEBUG script creates a short utility named RDEL(for recursive DELete)
that delete files from the current or specified directory and its descendents. First tpe the
following lines into a text file and rename it RDEL.SCR. Or just pull it from source.


N RDEL.COM
E 0100 EB 22 44 72 69 76 65 2C
E 0108 20 70 61 74 68 2C 20 6F
E 0110 72 20 66 69 6C 65 20 6E
E 0118 61 6D 65 20 69 6E 76 61
E 0120 6C 69 64 24 2A 2E 2A 00
E 0128 2E 2E 00 5C 00 00 00 00
E 0130 00 B4 19 CD 21 50 B4 47
E 0138 32 D2 BE 6A 02 CD 21 FC
E 140 BE 81 00 80 3C 20 75 03
E 0148 46 EB F8 80 3C 0D 74 1D
E 0150 80 7C 01 3A 75 23 B4 0E
E 0158 8A 14 80 E2 DF 80 EA 41
E 0160 CD 21 83 C6 02 B4 19 CD
E 0168 21 3A C2 74 0C B4 09 BA
E 0170 02 01 CD 21 B8 01 4C CD
E 0178 21 8B FE AC 3C 0D 74 0E
E 0180 3C 5C 75 F7 89 36 2F 01
E 0188 FF 0E 2D 01 EB ED C6 44
E 0190 FF 00 83 3E 2F 01 00 75
E 0198 06 89 3E 2D 01 EB 2E 39
E 01A0 3E 2F 01 75 11 89 3E 2D
E 01A8 01 FF 06 2D 01 B4 3B BA
E 01B0 2B 01 CD 21 EB 17 8B 36
E 01B8 2F 01 C6 04 00 89 36 2D
E 01C0 01 FF 06 2D 01 B4 3B 8B
E 01C8 D7 CD 21 72 0D 8B 36 2D
E 01D0 01 AC 3C 20 74 FB 3C 00
E 01D8 75 0E B4 0E 5A CD 21 B4
E 01E0 3B BA 69 02 CD 21 EB 85
E 01E8 E8 11 00 B4 0E 5A CD 21
E 01F0 B4 3B BA 69 02 CD 21 B8
E 01F8 00 4C CD 21 55 C4 2F CD
E 0200 21 53 06 83 EC 2B 8B EC
E 0208 B4 1A 8B D5 CD 21 B4 4E
E 0210 33 C9 8B 16 2D 01 CD 21
E 0218 72 0F B4 41 8B D5 83 C2
E 0220 1E CD 21 C4 4F CD 21 73
E 0228 F1 B4 4E B9 17 00 BA 24
E 0230 01 CD 21 72 25 80 7E 1E
E 0238 2E 74 19 F6 46 15 10 74
E 0240 13 B4 3B 8B D5 83 C2 1E
E 0248 CD 21 E8 AF FF B4 3B BA
E 0250 28 01 CD 21 B4 4F CD 21
E 0258 73 DB 83 C4 2B B4 1A 8C
E 0260 DB 1F 5A CD 21 8E DB 5D
E 0268 C3 5C
RCX
16A
W
Q


Compile RDEL.SR by typing
DEBUG < RDEL.SCR
at the prompt to create RDEL.COM. once that's dime , you can delete all the files with
the extension .BAK from the current drive by typing:

RDEL \*.BAK

To delete files with the extension .BAK from the \MISC directory and the sbdirectories below
it, but to leave BAK files in other subdirectories alone, type:
RDEL \MISC\*.BAK
RDEL does mot delete hidden files or system files. If you're a DOS5.0 user, you want to delete
these files too, use the ATTRIB command to strip the file attributes prior to running this program:typing
RDEL\*.* will wipe out an entire disk.
GO BACK TO DEBUG HOME PAGE

RETURN TO HOME PAGE