how can I in code delete all the subdir below content.ie5 which is located in the temporary internetfiles dir(hidden)
Printable View
how can I in code delete all the subdir below content.ie5 which is located in the temporary internetfiles dir(hidden)
Dim cFile As String
Dim cPath As String
cPath = "C:\Windows\Temporary Internet Files\Content.IE5"
cFile = Dir( cPath & "\*.*", vbDirectory + vbHidden + vbSystem )
Do While cFile <> ""
If Left$(cFile, 1) <> "." Then
Shell "Deltree " & cPath & "\" & cFile & " /Y" ' vbHide
End If
Loop
Note: IE must be closed, files cannot be opened.
Another question this app will be used on win98 nt4 and win2k and each has a different path to the temp internet files is there a way to obtain the correct path for each os through an api call?