|
-
August 28th, 2001, 03:22 AM
#1
Temporary Internet Files
Hi
i am trying to delete all the files in the folder
"Temporary Internet Files" by code
i tryed to use 'dir$' and 'kill' functions but it is not working
i am trying to access the explorer and activate the button 'Delete Files..'
any idea ???
limor
-
August 28th, 2001, 03:49 PM
#2
Re: Temporary Internet Files
Add a reference to Windows Scripting Runtime DLL (c:\windows\system\scrrun.dll) and try this behind a button:
private Sub Command1_Click()
Dim fs as FileSystemObject
Dim fld as Folder
Dim f as File
set fs = new FileSystemObject
set fld = fs.GetFolder("C:\Windows\Temporary Internet Files")
If fld.Files.Count > 0 then
for Each f In fld.Files
If f.Attributes <> (ReadOnly Or System Or Directory) then
f.Delete false
End If
next
End If
set f = nothing
set fld = nothing
set fs = nothing
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|