FileExists Function

指定したファイルやディレクトリが、データ記録媒体上で使用可能であるかを確認します。

構文:

FileExists(FileName As String | DirectoryName As String)

戻り値:

ブール型

パラメーター:

FileName | DirectoryName:ファイルの位置を明示的に指定した文字列表式。またURL 指定を用いることもできます。

Error codes:

5 無効なプロシージャー呼び出しです

例:

Sub ExampleFileExists

    MsgBox FileExists("C:\autoexec.bat")

    MsgBox FileExists("file:///d|/bookmark.htm")

    MsgBox FileExists("file:///d|/Private")

End Sub