vwFreak
08-31-2000, 11:03 AM
Please help!
how would one go about deleting ALL files in Temporary Internet Files folder from a VB application?
I'm able to delete files from any directory using the Kill command, except for the WINDOWS directory.
here is my Code could someone please tell me what I'm doing wrong.
Thank You
Private Sub cmdDelete_Click()
On Error GoTo FileError
Dim StrPrompt, StrPrompt1 As String
Dim VarReply As Variant
StrPrompt = "WARNING, This Process Cannot be Undone!"
StrPrompt1 = "Process Complete"
VarReply = MsgBox(StrPrompt, vbOKCancel, "DELETE ALL FILES")
If VarReply = vbOK Then
Kill "C:WINDOWSTemporary Internet Files*.*"
MsgBox (StrPrompt1), , "All files have been deleted successfully!"
Else
Unload frmDelete
End If
FileError:
If Err.Number = 53 Then
MsgBox ("The Folder is Empty")
End If
End Sub
how would one go about deleting ALL files in Temporary Internet Files folder from a VB application?
I'm able to delete files from any directory using the Kill command, except for the WINDOWS directory.
here is my Code could someone please tell me what I'm doing wrong.
Thank You
Private Sub cmdDelete_Click()
On Error GoTo FileError
Dim StrPrompt, StrPrompt1 As String
Dim VarReply As Variant
StrPrompt = "WARNING, This Process Cannot be Undone!"
StrPrompt1 = "Process Complete"
VarReply = MsgBox(StrPrompt, vbOKCancel, "DELETE ALL FILES")
If VarReply = vbOK Then
Kill "C:WINDOWSTemporary Internet Files*.*"
MsgBox (StrPrompt1), , "All files have been deleted successfully!"
Else
Unload frmDelete
End If
FileError:
If Err.Number = 53 Then
MsgBox ("The Folder is Empty")
End If
End Sub