Deleting zillions of tiny files from a volume

by Mitch Tulloch [Published on 15 June 2011 / Last Updated on 10 June 2010]

How to delete zillions of tiny files from a volume without taking forever.

Recently I heard about an administrator who had turned on logging on a server at an inappropriately high level. The result was that there were tens of gigabytes of tiny 2kB log files filling up a disk volume on the server, and when the administrator tried deleting them from the command line using the Del command, it became evident that it was going to take several days for all the files to be deleted from the volume. What can you do in this situation?

The fastest (and best) solution is actually is to back up the volume (excluding the unwanted files), format the volume, and then restore the backed up files to the volume. This not only deletes the unwanted files but also restores the Master File Table on the volume to an appropriate size.

If you have feedback concerning this tip, please email me. And be sure to check out my website!

See Also

The Author — Mitch Tulloch

Mitch Tulloch is a well-known expert on Windows Server administration and cloud computing technologies. He has published over a thousand articles on information technology topics and has written, contributed to or been series editor for over 50 books.

Featured Links