Windows Delete Without Recycle
I want to delete a folder that contains thousands of files and folders. If I use Windows Explorer to delete the folder it can take 10-15 minutes (not always, but often). Is there a faster way in Windows to delete folders?
Other details:
- I don't care about the recycle bin.
- It's an NTFS drive.
Empty the Recycle Bin Without the Confirmation Window Showing Up. Here is a registry edit to turn off the prompt in Windows 7, 8 and Windows 10, using NirCmd. This registry edit replaces the Empty Recycle Bin command in the right-click menu and the ribbon button action with NirCmd, so that the Recycle Bin can be emptied silently.
BrezzaPBrezzaPWindows Delete Without Recycle Bin
locked by Robert Harvey♦Sep 18 '14 at 20:57
This question’s answers are a collaborative effort. If you see something that can be improved, just edit the answer to improve it! No additional answers can be added here.
Read more about locked posts here.
6 Answers
Stephen DenneStephen DenneThe worst way is to send to Recycle Bin: you still need to delete them. Next worst is shift+delete with Windows Explorer: it wastes loads of time checking the contents before starting deleting anything.
Next best is to use rmdir /s/q foldername
from the command line. del /f/s/q foldername
is good too, but it leaves behind the directory structure.
The best I've found is a two line batch file with a first pass to delete files and outputs to nul to avoid the overhead of writing to screen for every singe file. A second pass then cleans up the remaining directory structure:
This is nearly three times faster than a single rmdir, based on time tests with a Windows XP encrypted disk, deleting ~30GB/1,000,000 files/15,000 folders: rmdir
takes ~2.5 hours, del+rmdir
takes ~53 minutes. More info at Super User.
This is a regular task for me, so I usually move the stuff I need to delete to C:stufftodelete and have those del+rmdir
commands in a deletestuff.bat batch file. This is scheduled to run at night, but sometimes I need to run it during the day so the quicker the better.
Technet documentation for del
command can be found here. Additional info on the parameters used above:
/f
- Force (i.e. delete files even if they're read only)/s
- Recursive / Include Subfolders (this definition from SS64, as technet simply states 'specified files', which isn't helpful)./q
- Quiet (i.e. do not prompt user for confirmation)
Windows Delete Folder Without Recycle
Documentation for rmdir
here. Parameters are:
/s
- Recursive (i.e. same as del's /s parameter)/q
- Quiet (i.e. same as del's /q parameter)
use fastcopy, a free tool. it has a delete option that is a lot faster then the way windows deletes files.
Stephen Denneuse the command prompt, as suggested. I figured out why explorer is so slow a while ago, it gives you an estimate of how long it will take to delete the files/folders. To do this, it has to scan the number of items and the size. This takes ages, hence the ridiculous wait with large folders.
Also, explorer will stop if there is a particular problem with a file,
nicodemus13nicodemus13and to delete a lot of folders, you could also create a batch file with the command spdenne posted.
1) make a text file that has the following contents replacing the folder names in quotes with your folder names:
2) save the batch file with a .bat extension (for example deletefiles.bat)
3) open a command prompt (Start > Run > Cmd) and execute the batch file. you can do this like so from the command prompt (substituting X for your drive letter):
Try [shift]+[delete] did 24.000 files in 2 minutes for me