![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | How to clear the cache of Internet Explorer using the VB Script? Hi, Can anyone tell me the procedure to clear the cache and to delete the cookies of the internet explorer using the VB Script file? Thanks, PK |
My System Specs![]() |
| | #2 (permalink) |
| | Re: How to clear the cache of Internet Explorer using the VB Script? "PK" <PK@xxxxxx> wrote in message news:9B043917-EDEF-4F3C-8F4F-36E839F8D382@xxxxxx Quote: > Hi, > > Can anyone tell me the procedure to clear the cache and to delete the > cookies of the internet explorer using the VB Script file? > > Thanks, > > PK > Const TEMPORARY_INTERNET_FILES = &H20& Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.Namespace(TEMPORARY_INTERNET_FILES) Set objFolderItem = objFolder.Self strPath = objFolderItem.Path & "\*.*" strPath1 = objFolderItem.Path & "\Content.IE5\" Set objFSO = CreateObject("Scripting.FileSystemObject") objFSO.DeleteFile(strPath) on error resume next '------------------------------------------------------------------ ' loop 1 to delete the folders that start with a number For I = 0 to 9 ' used to see the script running 'Wscript.Echo strPath1 & I & "*" objFSO.DeleteFolder(strPath1 & I & "*") next '------------------------------------------------------------------ ' loop 2 to delete the folders that start with a letter For I = 1 to 26 if I = 1 then u = "A" end if if I = 2 then u = "B" end if if I = 3 then u = "C" end if if I = 4 then u = "D" end if if I = 5 then u = "E" end if if I = 6 then u = "F" end if if I = 7 then u = "G" end if if I = 8 then u = "H" end if if I = 9 then u = "I" end if if I = 10 then u = "J" end if if I = 11 then u = "K" end if if I = 12 then u = "L" end if if I = 13 then u = "M" end if if I = 14 then u = "N" end if if I = 15 then u = "O" end if if I = 16 then u = "P" end if if I = 17 then u = "Q" end if if I = 18 then u = "R" end if if I = 19 then u = "S" end if if I = 20 then u = "T" end if if I = 21 then u = "U" end if if I = 22 then u = "V" end if if I = 23 then u = "W" end if if I = 24 then u = "X" end if if I = 25 then u = "Y" end if if I = 26 then u = "Z" end if ' used to see the script running 'Wscript.Echo strPath1 & u & "*" objFSO.DeleteFolder(strPath1 & u & "*") next |
My System Specs![]() |
| | #3 (permalink) |
| | Re: How to clear the cache of Internet Explorer using the VB Script? "PK" <PK@xxxxxx> wrote in message news:9B043917-EDEF-4F3C-8F4F-36E839F8D382@xxxxxx Quote: > Hi, > > Can anyone tell me the procedure to clear the cache and to delete the > cookies of the internet explorer using the VB Script file? > > Thanks, > > PK Const TEMPORARY_INTERNET_FILES = &H20& Set objFSO = CreateObject("Scripting.FileSystemObject") Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.Namespace(TEMPORARY_INTERNET_FILES) objFSO.DeleteFile(objFolder.Self.Path & "\*.*") sPath = objFSO.GetFolder(objFolder.Self.path) & "\Content.IE5\" Set objFolders = objFSO.GetFolder(sPath) For Each objFName In objFolders.SubFolders WScript.Echo sPath & objFName.Name objFSO.DeleteFolder(sPath & objFName.Name) Next |
My System Specs![]() |
| | #4 (permalink) |
| | Re: How to clear the cache of Internet Explorer using the VB Script? "Pegasus (MVP)" <I.can@xxxxxx> wrote in message news:OuMPPUIyIHA.5716@xxxxxx Quote: > > "PK" <PK@xxxxxx> wrote in message > news:9B043917-EDEF-4F3C-8F4F-36E839F8D382@xxxxxx Quote: >> Hi, >> >> Can anyone tell me the procedure to clear the cache and to delete the >> cookies of the internet explorer using the VB Script file? >> >> Thanks, >> >> PK > Here is a somewhat tightened up version of the idea presented by hb21: > > Const TEMPORARY_INTERNET_FILES = &H20& > Set objFSO = CreateObject("Scripting.FileSystemObject") > Set objShell = CreateObject("Shell.Application") > Set objFolder = objShell.Namespace(TEMPORARY_INTERNET_FILES) > objFSO.DeleteFile(objFolder.Self.Path & "\*.*") > > sPath = objFSO.GetFolder(objFolder.Self.path) & "\Content.IE5\" > Set objFolders = objFSO.GetFolder(sPath) > For Each objFName In objFolders.SubFolders > WScript.Echo sPath & objFName.Name > objFSO.DeleteFolder(sPath & objFName.Name) > Next > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| RE: How can I manually clear the cache ? | Vista General | |||
| RE: How can I manually clear the cache ? | Vista General | |||
| where is Internet Explorer Cache located? | Vista General | |||
| where is Internet Explorer Cache located? | Vista file management | |||
| How do I clear the Client Side Cache (CSC) | Vista General | |||