Problem with VB.NET

  • Thread starter Thread starter Omega Warrior
  • Start date Start date
O

Omega Warrior

I have a problem with this line of code:

Imports System.IO

Public Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer2.Tick

kill("C:\test\tsoc.txt")

end sub

when i run it there is an error : No files found matching
"C:\test\tsoc.txt"

and the file exists 100%, some files he can delete but on some files he
gives me this error!

Any thoughts?


Thank You!
 
Perhaps the error comes as a result of a second timer tick (after you
already have killed the file)?

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.
 
Back
Top