====== CHOOSEDIR method (Filesystem) ====== ==== Description ==== Displays the “Select Folder” Windows Common Dialog Box to allow the user to select a directory or folder name: {{Select_Folder.png?334x384}} ==== Syntax ==== DirName = Exec_Method( "FILESYSTEM", "CHOOSEDIR", OwnerWindow, ChooseDirOptions ) ==== Parameters ==== ^Name^Required^Description^ |OwnerWindow|No|ID of the parent window for the dialog. This can be null, in which case the parent window is the desktop.| |ChooseDirOptions|No|Contains an @Fm-delimited dynamic array of options that control the behavior of the dialog. It has the following structure:\\ \\ <1> Title\\ \\ <2> Initial Directory\\ \\ <3> Hide new folder button\\ \\ <4> Show Files| ==== Returns ==== The name and path of the selected folder. ==== Remarks ==== The ChooseDirOptions argument is composed of four fields which control the behavior of the dialog – each field is described fully below: ^Field^Name^Description^ |<1>|Title|Text to display in the title area of the dialog just above the list of folders:\\ {{Browse_Folder.png?335x123}}| |<2>|Initial Directory|Specifies the initial directory to display when the dialog is created.| |<3>|Hide New Folder|If TRUE$ then the “Make New Folder” button is hidden.| |<4>|Show Files|If TRUE$ then files are displayed in the dialog as well as folders.| The CHOOSEDIR method is basically a wrapper around the SHBrowserForFolder Windows API function, so it is worth examining at the documentation for this on the MSDN website to get a better idea of the capabilities of this method. Equated constants for use with the CHOOSEDIR method can be found in the PS_CHOOSEDIR_EQUATES insert record. ==== See Also ==== N/A