GETDIR( ) Function

See Also

Displays the Select Directory dialog box from which you can choose a directory.

Syntax

GETDIR([cDirectory [, cText]])

Returns

Character

Arguments

cDirectory

Specifies the directory that is initially displayed in the dialog box. When cDirectory is not specified, the dialog box opens with the Visual FoxPro default directory displayed.

cText

Specifies the text for the directory list in the dialog box. In Windows 3.1, the text appears as the caption in the title bar of the dialog box. In Windows 95, the text appears below the title bar inside the dialog box.

Remarks

GETDIR( ) returns as a character string the name of the directory you choose.

If you do not choose a directory (you click Cancel, press ESC, or choose Close from the window menu), GETDIR( ) returns the empty string.