Search Tools Links Login

[A+] Check file existence


This function can be used to determine if some
file exists or not. It returns "True" when file
does exist, and "False" when it doesn't.
Please vote for this cute little code! Thank you so much!

Original Author: coder86

Code

' Returns True in case path (file) exists:
Function FileExists(ByVal sFileName As String) As Boolean
Dim i As Integer

On Error GoTo NotFound

i = GetAttr(sFileName)

FileExists = True

Exit Function

NotFound:
FileExists = False

End Function

About this post

Posted: 2003-06-01
By: ArchiveBot
Viewed: 100 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.