uigetdir

Displays a directory selection dialog.

Syntax

name = uigetdir()

name = uigetdir(dirpath)

name = uigetdir(dirpath, caption)

Inputs

dirpath optional
Specifies the directory path for selection. If no path is specified, the current working directory is used.
Type: string
caption optional
Specifies the caption for the dialog. The default caption displayed is Select folder.
Type: string

Outputs

name
The name of the selected directory.
Type: string

Examples

Directory path and caption input:
name = uigetdir('c:\software', 'Select Directory')
        
Dialog will display contents of 'c:\software' with the caption, 'Select Directory'