04 May 2011

Huge amount of files fills up harddrive

I was called to a customer, because their Management Server was running out of space on drive C:
After some investigation, I found that one folder held millions of files taking up 10 GB of space
The folder holding all these files was:

C:\Document And Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys

The huge number of files did that the GUI did not work, so..
how to delete old files from the command line ??

The I stumbled over an internal utility / command: FORFILES
Forfiles has the option of locating files ie on dates or "files older than xx days" and then fire a command
- just what I needed..

So - this command did the trick:
forfiles /D -180 /C "cmd /c del /A:S /Q @path"
(find files older than 180 days and delete... /A:S because these files are system files)

I navigated to the MachineKeys folder and fired the command...
- well... it runs very slow... but it works.

Now I have freed up some space, so now I will try to locate the application that fills the folder.
As I suspected, it was the Quest QMX tool that throw all these files..
And to be more specific... it was the Oracle extension. I will now have a dialog with the Quest team about this.

Well, it turned out that this was a known bug in that version of the Oracle extension.
It is fixed in newer versions.