9- چک کردن وجود فایل.

Vb6
If Dir("c:\file.txt") <> "" Then
MsgBox("File Found!")
Else
MsgBox("File Not Found!")
End If
VB.Net
If File.Exists("C: \File.txt") Then
MessageBox.Show("File Found!")
Else
MessageBox.Show("File Not Found!")
End If