HackDig : Dig high-quality web security articles for hackers

Top 50 DOS Problems Solved: Recursive Delete

2015-09-15 16:10

Q: What is the quickest way to delete all the files in a sub-directory, plus all the files in any sub-directories inside it, and so on as deep as directories go, along with the sub-directories themselves? In other words how do you delete an entire branch of sub-directories within sub-directories without typing a lot of DEL, CD and RD commands?

A: There is no easy way for DOS to do this unassisted. The nearest any version comes is DR DOS which can delete the files, but not remove the sub-directories themselves. The relevant command is:

XDEL *.* /S

No version of MS-DOS can automatically delete files in sub-directories. To do the job in its entirety you need a third-party tree pruning utility. You can often find these in PD/shareware libraries. Alternatively, commercial disk utilities such as Xtree will do it.

Leaving aside the amazingness of not having recursive delete, I wonder why the DR-DOS folk decided to produce a command which removed the files but not the directories?


Source: 1843=p?/ten.vreg.golb

Read:3285 | Comments:0 | Tags:No Tag

“Top 50 DOS Problems Solved: Recursive Delete”0 Comments

Submit A Comment

Name:

Email:

Blog :

Verification Code:

Tools