|

VB.NET Programming Examples: Email, Encryption, Zip, HTTP, XML, FTP
Chilkat Software Components
ASP.NET / VB.NET File Exists Sample Code
Back
How to check to see if a file or folder / directory exists in VB.NET and/or ASP.NET
Public Function FileExists(ByVal filePath As String) _
As Boolean
Dim f As New IO.FileInfo(filePath)
Return f.Exists
End Function
Public Function FolderExists(ByVal folderPath As String) _
As Boolean
Dim f As New IO.DirectoryInfo(folderPath)
Return f.Exists
End Function
|