FolderItemDialog.InitialDirectory

From Xojo Documentation

Property (As FolderItem )
aFolderItemDialog.InitialDirectory = newFolderItemValue
or
FolderItemValue = aFolderItemDialog.InitialDirectory

Supported for all project types and targets.

Full or relative path to directory whose contents are displayed when the dialog first appears.

Notes

The Filter property controls which files within this directory are visible. On Windows, this defaults to the My Documents directory if no FolderItem is specified.

Example

This example illustrates all the labelling properties of a FolderItemDialog.

Dim dlg As OpenDialog
Dim f As FolderItem
dlg = New OpenDialog

#If Not (TargetLinux) then
dlg.InitialDirectory = SpecialFolder.Documents
#Else //open Home directory on linux
dlg.InitialDirectory = SpecialFolder.home
#Endif
f = dlg.ShowModal