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 Wi. Nov 13, 2018 If you are looking to delete a file, directory, or folder, the steps vary depending on the method you'd like to use, as well as your operating system. To proceed, choose from the list of options below and follow the instructions. Microsoft Windows users can delete a file or folder (directory) using.
Active1 year, 9 months ago
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.
7,01877 gold badges2222 silver badges3838 bronze badges
BrezzaPBrezzaP1,29333 gold badges99 silver badges1010 bronze badges
locked by Robert HarveySep 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.
![Windows Windows](/uploads/1/2/5/0/125029351/547516044.png)
Read more about locked posts here.
6 Answers
Stephen DenneStephen Denne30.7k1010 gold badges4040 silver badges5757 bronze badges
The 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:![Delete files from windows installer folder Delete files from windows installer folder](/uploads/1/2/5/0/125029351/885816121.png)
/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)
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)
15.2k22 gold badges5252 silver badges121121 bronze badges
HugoHugo17.9k55 gold badges4646 silver badges6767 bronze badges
use fastcopy, a free tool. it has a delete option that is a lot faster then the way windows deletes files.
Stephen Denne30.7k1010 gold badges4040 silver badges5757 bronze badges
d9ping
use 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,
nicodemus13nicodemus131,58611 gold badge1111 silver badges2828 bronze badges
Remove Files From Windows Temp Folder
and 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):
xyz3) 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):
17.8k2929 gold badges100100 silver badges145145 bronze badges
Delete A File Windows
defconjuan
Try [shift]+[delete] did 24.000 files in 2 minutes for me
jeroenjeroen
Not the answer you're looking for? Browse other questions tagged windowswindows-xpfile-management or ask your own question.
Sooner or later, you’ll want to delete a file or folder in Windows 10 — yesterday’s lottery picks, for example, or a particularly embarrassing digital photo. To delete a file or folder, right-click its name or icon. Then choose Delete from the pop-up menu. This surprisingly simple trick works for files, folders, shortcuts, and just about anything else in Windows.
To delete in a hurry, click the offending object and press the Delete key. Dragging and dropping a file or folder to the Recycle Bin does the same thing.
The Delete option deletes entire folders, including any files or folders stuffed inside those folders. Make sure that you select the correct folder before you choose Delete.
- After you choose Delete, Windows tosses a box in your face, asking whether you’re sure. If you’re sure, click Yes. If you’re tired of Windows cautiously questioning you, right-click the Recycle Bin, choose Properties, and remove the check mark next to Display Delete Confirmation Dialog. Windows proceeds to delete any highlighted items whenever you — or an inadvertent brush of your shirt sleeve — press the Delete key.
- Be extra sure that you know what you’re doing when deleting any file that depicts a little gear in its icon. These files are usually sensitive hidden files, and the computer wants you to leave them alone. (Other than that, they’re not particularly exciting, despite the action-oriented gears.)
- Icons with little arrows in their corner are shortcuts, which are push buttons that merely load files. Deleting shortcuts deletes only a button that loads a file or program. The file or program itself remains undamaged and still lives inside your computer.
- As soon as you find out how to delete files, you need to find out how to undelete them. (Hint for the desperate: Open the Recycle Bin, right-click your file’s name, and choose Restore.)