DIRECTORY( ) Function

Locates the specified directory.

DIRECTORY(cDirectoryName [, nFlags])



Specifies the name of the directory to locate. If you do not include an absolute path for the directory you specify, Visual FoxPro searches for the directory relative to the Visual FoxPro default directory.


Specifies the kind of value DIRECTORY( ) returns when the directory exists but might be marked with the Hidden or System attribute. The following table lists the values for nFlags.

nFlags Description


DIRECTORY( ) returns False (.F.) if the directory exists but is marked with a Hidden or System attribute. (Default)


DIRECTORY( ) returns True (.T.) if the directory exists, regardless of its attributes. Setting nFlags to 1 allows you to check for hidden or system files.

Expand imageReturn Value

Expand imageRemarks

Expand imageSee Also

© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic