Whether the file is existently fileexists method

xiaoxiao2021-03-06  52

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

转载请注明原文地址:https://www.9cbs.com/read-117633.html

New Post(0)