Home » Questions » Computers [ Ask a new question ]

Mass deleting files in Windows

Mass deleting files in Windows

I have a directory, that contains ~ 3 million files in certain subdirectories on a Windows 2008 server. Manually deleting the files via SHIFT+DEL on the root dir takes ages. Is there any other way to do the deletion in a faster manner?

Asked by: Guest | Views: 342
Total answers/comments: 4
Guest [Entry]

"In command prompt (Start -> Run -> cmd):

del /f /s /q foldername"
Guest [Entry]

"Using the code below usually works well for me.

mkdir empty_dir
robocopy empty_dir dir_to_wipe /mir /r:0 /w:0 /e
rmdir empty_dir dir_to_wipe"
Guest [Entry]

Use the rd /s command from the command prompt.
Guest [Entry]

"The best practical solution is probably to move the folder out of the way somewhere (e.g. the Recycle Bin) and then start deleting it. It'll take ages, but at least it'll be out of the way.

I'm pretty sure the time required to delete all those files is an inherent requirement of the task, not an inefficiency in the implementation of deletion."