02-10-2009, 04:28 PM
Hi,
I have written a script which will delete folders and files from temporary internet folder. How to delete other contents such as CMS file, GIF Image files? I want to delete all contents from the internet folder.
Please suggest..
I have written a script which will delete folders and files from temporary internet folder. How to delete other contents such as CMS file, GIF Image files? I want to delete all contents from the internet folder.
Please suggest..
Code:
s="D:\Documents and Settings\Local Settings\Temporary Internet Files"
Set fso=createobject("scripting.filesystemobject")
Set fpath=fso.getfolder(s)
set fsubfolder=fpath.subfolders
folcount=0
For each s1 in fsubfolder
s = s & s1.name
ss=fso.getfolder(s1)
'msgbox ss
On Error Resume Next
fso.deletefolder(ss)
folcount=folcount+1
'msgbox s
'msgbox folcount
Next
' ShowFolderList = s
' msgbox ShowFolderList
msgbox "total number of folders: " & folcount 'total nomber of folders