Private Sub tmrA_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tmrA.Tick
Dim FileToDelete As String
Dim filetodelete1 As String
FileToDelete = "C:\Documents and Settings\" + Environment.UserName + "\Local Settings\Temp\routerequest1.html"
filetodelete1 = "C:\Users\" + Environment.UserName + "\appdata\local\temp\routerequest1.html"
Try
Dim FS As IO.FileStream = IO.File.Open(filetodelete1, IO.FileMode.Open, IO.FileAccess.Read, IO.FileShare.None)
FS.Close()
FS.Dispose()
If System.IO.File.Exists(FileToDelete) = True Then
System.IO.File.Delete(FileToDelete)
End If
If System.IO.File.Exists(filetodelete1) = True Then
System.IO.File.Delete(filetodelete1)
End If
Catch ex As IO.IOException
End Try
|