Check If File Exists using VB.Net
FileInfo is a object derived from System.IO name space.
FileInfo has a property called “Exists”. This propery returns true if the file exists. False if file does not exists.
=========(VB.NET)=============== Imports System.IO Declare Dim testfile As New FileInfo("c:\My Document\testfile.txt") If testfile.Exists() Then return true Else return false End If
Tags: VB.Net
This entry was posted
on Monday, May 4th, 2009 at 9:15 PM and is filed under VB.Net.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.

Leave a reply