Windows – Fastest Large Directory/Folder Delete Method

windowswindows-server-2003

I need to delete a large directory on one of our Windows 2003 servers containing around 1TB of data. Would the quickest way to delete this be to use cmd > rmdir?

Best Answer

Really, the fastest way I've discovered to do it has been, "rmdir /s [directory]". It seems to involve a LOT less meta-data operations than a, "del ." does, which makes it very zippy. I use it regularly to remove home directories with many thousands of files. Absolutely way faster than a remove-directory from Explorer, which seems to feel the need to count all the files before removing.

I haven't gone up to 1TB yet. If that 1TB involves less than, say, 10K files the big metadata operations would be marking vast swaths of space as free in the MFT. If that 1TB involves millions of files, then the metadata operations start to really slow things down on a file-by-file level. In that case, rmdir /s beats the pants off of Explorer.