ISFOLDER function

Purpose

Determine whether or not a folder exists.

Syntax

FolderExists& = ISFOLDER(FolderName)

Remarks

The file subsystem is checked to determine whether the folder specified by FolderName currently exists.  If it is found in any form (hidden, system, read-only, etc.), the value true (-1) is returned.  Otherwise, the value false (0) is returned.

The root directory (for example, "C:\") is considered to be a folder, and returns the value true (-1).

FolderName is an unambiguous file name, which may not contain an asterisk (*) or query (?).  If it contains one or more of those characters, the function always returns false (0).

See also

DIR$, ISFILE, PATHSCAN$