FileExists Function

Determines if a file or a directory is available on the data medium.

αƒ‘αƒ˜αƒœαƒ’αƒαƒ₯αƒ‘αƒ˜


FileExists(FileName As String | DirectoryName As String)

αƒ“αƒαƒ‘αƒ αƒ£αƒœαƒ”αƒ‘αƒ£αƒšαƒ˜ αƒ›αƒœαƒ˜αƒ¨αƒ•αƒœαƒ”αƒšαƒαƒ‘αƒ:

Bool

Parameters:

FileName | DirectoryName: Any string expression that contains an unambiguous file specification. You can also use URL notation.

Error codes:

D'oh! You found a bug (text/sbasic/shared/00000003.xhp#err5 not found).

αƒ›αƒαƒ’αƒαƒšαƒ˜αƒ—αƒ˜:


Sub ExampleFileExists
    MsgBox FileExists("C:\autoexec.bat")
    MsgBox FileExists("file:///d|/bookmark.htm")
    MsgBox FileExists("file:///d|/Private")
End Sub

Please support us!