any ideas?
k, code not working..not sure why...
Code:
Try
dim f as string = "C:\"
dim vartest as integer = 1
Dim currentdir As New DirectoryInfo(f)
For Each exe As FileInfo In currentdir.GetFiles("*")
If exe.ToString = "file.txt" Then
Try
check = (exe.DirectoryName & "file.txt")
If vartest = 1 Then
Try
MsgBox("completed 1")
Catch
MsgBox("error 1")
End Try
ElseIf vartest = 2 Then
Try
MsgBox("completed 2")
Catch
MsgBox("error 2")
End Try
End If
' pause
System.Threading.Thread.Sleep(2000)
Catch
End Try
End If
Next
Catch
End Try


i m good in vb