Better way to delete files?

Permabanned
Joined
19 Apr 2006
Posts
2,333
Location
West Yorkshire
I have about 600 directories to delete, each with an unspecified amount of subdirectories.

Selecting them all then shift+del takes an absolute age to bring up the "deleting blah" prompt.

Then somewhere in there is a file it cannot delete, so instead of continuing past that file the whole thing has to start again.

I have been at this for ******* hours!!!! please tell me there is a better way, some untility that will delete and wont just stop if it finds one file it doesnt like?
 
are they all in the same subfolder or in different locations?

rd /s /q "c:\path"

that will remove directories and all subfolders and files, without prompt and will skip things that it doesn't have permission to do or that are locked




dir /b > files.txt

do that in a folder to get all the folder and file names (of that directory you're running it from) to list them in a file called files.txt, copy this into excel and you can quickly make a massive batch file but filling the column a with "rd /s /q" then copy all back to notepad and do a find and replace for the 'tab' function, there's one in here for you... " " replace it with a space and save as .bat

i don't need to tell you this mate, but for others -be careful when using rd!


add me to msn if you want a better explanation
 
Now there's a blast from the past Bledd :)

the RD command, I had forgotten it even existed.

Thanks for prompting me and it works like a charm :)
 
Back
Top Bottom