Search Tools Links Login

A FileExists Function


Visual Basic 6, or VB Classic

Checks to see if a file exists.

Original Author: Blake Royer

Inputs

full file path(FullFileName as String)

Returns

True or False

Code

Private Function FileExists(FullFileName As String) As Boolean
On Error GoTo MakeF
'If file does not exist, there will be an error
Open FullFileName For Input As #1
Close #1
'no error, file exists
FileExists = True
Exit Function
MakeF:
'error, file does not exist
FileExists = False
Exit Function
End Function

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 116 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.