Search This Blog

Tuesday, October 1, 2013

Snipe Hunt: Finding best way to delete large number of files in Windows 7

Attempting to defrag my hard drive recent and one of the largest fragmented folders was:

C:\Windows\SysWOW64\config\systemprofile\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5

Turns out this folder had over 39 million files taking up 60 GB of drive space.
So it begs the question how do you delete a huge number of files from Windows 7.

Turns out this is the approach I am currently using:

del /f/s/q %1 > nul 
rmdir /s/q %1

from http://www.anushand.com/2012/09/a-faster-way-to-delete-large-folders-in.html

I've estimated it will take ~ 4 days to delete all of these files.

My steps:

1. Rename folder Content.IE5 to (old) Content.IE5
2. Run
                del /f/s/q %1 > nul 
                rmdir /s/q %1

                del /f/s/q "(old) Content.IE5\CAY*.*"

No comments: