Warning: This Help page is relevant to LibreOffice up to version 6.0.
For updated Help pages, visit https://help.libreoffice.org.

FileExists Function [Runtime]

From LibreOffice Help
Jump to: navigation, search

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


FileExists(FileName As String | DirectoryName As String)

Return value:



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

Error Codes

5 Invalid procedure call


sub ExampleFileExists

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

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

msgbox FileExists("file:///d|/private")

end sub