README.md

December 5, 2022 ยท View on GitHub

A FileExists Function

Description

Checks to see if a file exists.

More Info

full file path(FullFileName as String)

True or False

Submitted On
ByBlake Royer
LevelBeginner
User Rating3.3 (62 globes from 19 users)
CompatibilityVB 3.0, VB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0
CategoryFiles/ File Controls/ Input/ Output
WorldVisual Basic
Archive File

Source 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