Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to delete contents of temp internet folder
#1
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..
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Delete Firefox history and Cookies Anupama 0 1,878 06-18-2018, 11:57 AM
Last Post: Anupama
  Executing via create "RES"xx folder? nishitd 0 1,691 03-07-2018, 01:09 AM
Last Post: nishitd
  code for validation to create a sub folder smiley 0 1,885 10-19-2016, 10:08 PM
Last Post: smiley
  [UFT] Close opened folder robertosalemi 1 3,877 02-10-2016, 07:06 PM
Last Post: robertosalemi
  Run scripts from folder badri 1 3,323 11-26-2014, 06:18 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)