Microsoft (R) Visual Basic (R) Scripting EditionFileExists Method Scripting Runtime Reference Version 3
Please refer to applying
description
If the specified file is returned
True; otherwise returned
False.
grammar
Object.
FileExists
FILESPEC
)
The syntax of the FileExists method has the following sections:
Some describe Object must be selected. The name of the FILESystemObject object. FileSpec is required. File name, means that you want to determine if there is an existing file. If the file is not in the current folder, the full path name (absolute path or relative path) must be provided.
Description
Example of the following example explains how to use
FileExists method:
Function ReportFileStatus (FileSpec)
DIM FSO, MSG
SET FSO = CreateObject ("scripting.filesystemObject")
IF (fso.fileexists (filespec)) THEN
Msg = filespec & "exists."
Else
Msg = filespec & "does not exist."
END IF
ReportFileStatus = MSG
END FUNCTION