11-15-2011, 12:35 PM
Code:
Sub DeleteCache()
Dim root
Set root = CreateObject("FPC.Root")
Dim server
Dim cacheDrives
Dim cacheDrive
Dim fso
Set server = root.GetContainingServer()
server.StopFirewallService()
Set cacheDrives = server.CacheDrives
Set fso = CreateObject("Scripting.FileSystemObject")
For Each cacheDrive In cacheDrives
cacheFilePath = CacheDrive.Name & "\urlcache\Dir1.cdat"
fso.DeleteFile cacheFilePath
Next
server.StartFirewallService()
End Sub