Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Temporary Internet Files

Status
Not open for further replies.

glmrenard

Technical User
Oct 29, 2002
52
FR
Hello,

How can I destroy, in fact I want to empty the temporary internet files from a win2003 computer ?

Thanks in advance

Guillaume
 
Hello,

Does anyone know how it is possible to empty all the temporary internet files from all my users on a win2003 server.

Thanks in advance

Guillaume
 
to remove files from an OS you need to be able to delete them.
use the filesystem object.

Set FSO = Wscript.CreateObject("Scripting.FileSystem")
Set objFolder = FSO.GetFolder("c:\temp")

For Each aFile In objFolder.Files
aFile.Delete
If Err.Number <> 0 Then
'do something if it failed?
End If
Next


or you could just do FSO.DeleteFolder(&quot;c:\blaa&quot;)
not sure how that would react to a file being in use.

if you use the first method with an 'on error resume next' you might find you get better results

regards
richard von moyla
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top