FileSystemObject.FileExists Method (VB6) |
Yes
oFileSysObj.FileExists(FileSpec)
oFileSysObj
Use: Required
Data Type: FileSystemObject object
Any object variable returning a FileSystemObject object.
FileSpec
Use: Required
Data Type: String
A complete path to the file.
Boolean (True or False).
Determines if a given file exists.
Returns True if the file exists or is connected to the machine, False if not.
FileSpec can't contain wildcard characters.
If the user has adequate rights, FileSpec can be a network path or share name. For example:
If ofs.FileExists("\TestPathTest.txt") Then