Dim strPath As String = "C:\d.txt"
Dim SW As StreamWriter
Dim FS As FileStream

If File.Exists(strPath) = True Then
MsgBox("True")
FS = New FileStream(strPath, FileMode.Open)
SW = New StreamWriter(FS)
SW.WriteLine("True")
Else
MsgBox("False")
FS = New FileStream(strPath, FileMode.Create)
SW = New StreamWriter(FS)
SW.WriteLine("False")
End If

SW.Close()
FS.Close()