Wednesday, January 22, 2014

Deleting multiple small files fast on windows

If you want to delete 21Gb or small txt files from your hard disk you will notice that the GUI is slow (finding files first etc). The fastest way I have found is the following:

del /f/s/q foldername > nul
rmdir /s/q foldername

Thanks Hugo for the tip.

1 comment:

Anonymous said...

One of my favourites for clearing out files in a folder without deleting the folder is "rd . /s /q". This command should be run from the folder you want to clear out. Make sure you understand what it is doing *before* you use it on a live system. Subdirectories and contents will be removed as well.