FileExists-functie

Bepaalt of een bestand of een directory beschikbaar is op het gegevensmedium.

Syntaxis:

FileExists(BestandsNaam As String | DirectoryNaam As String )

Teruggegeven waarde:

Booleaans

Parameters:

Bestandsnaam | MapNaam: Elke tekenreeks die een ondubbelzinnige bestandsspecificatie bevat. De URL-notatie kan hier ook worden gebruikt.

Foutcodes:

5 Ongeldige aanroep van procedure

Voorbeeld:

Sub ExampleFileExists

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

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

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

End Sub