Dim temp Set fso = CreateObject ("Scripting.FileSystemObject") Set winsh = CreateObject ("Wscript.Shell") Set temp = fso.GetFolder (winsh.ExpandEnvironmentStrings("%TEMP%")) On Error Resume Next For each ofile in temp.Files fso.DeleteFile ofile next For Each osubfldr in temp.subfolders fso.DeleteFolder (osubfldr),true next wscript.quit
just try this for deleting temp files..
Thursday, January 15, 2009 4:35 AM
Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.