New topics: Your Pet, IOU, Baby IQ, The Poisons, Birther II, Games, Future Power

How To Delete Lots Of Directories

Skip to end of sidebar
Go to start of sidebar
Skip to end of metadata
Go to start of metadata
Be very careful with the information in this tech tip...

I tried running a tool called rlinux to recover the files from a damaged linux partition. Unfortunately the tool created tens of thousands of bogus directories and empty files. In fact so many that windows file explorer is getting stuck when it tries to display the contents of the directory.

The first thing involved

attrib -r -s *

so that the files could be deleted.

The obvious use of

rd /s *

doesn't work. DOS prompt doesn't like to deal with wildcards when deleting directories.

Another solution is to use a DOS FOR command like this:

for /d %i in (*) do rd /s /q %i

Doing it this way has the nice benefit of not putting stuff in the recycle bin.

So use with caution!

Labels:
directories directories Delete
delete delete Delete
computers computers Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.