###Function### FileSelectFolder ###Description### Initiates a Browse For Folder dialog. ###Syntax### FileSelectFolder ( "dialog text", "root dir" [, flag = 0 [, "initial dir" [, hwnd]]] ) ###Parameters### @@ParamTable@@ dialog text Text greeting in dialog. root dir Root directory of GUI file tree. It limits a choice in the root folder. Use "" for Desktop to be root. flag [optional] $FSF_SCHOWCREATEBUTTON (1) = Show Create Folder Button (XP only) $FSF_NEWDIALOGSTYLE (2) = Use New Dialog Style (XP only) $FSF_SHOWEDITCONTROL (4) = Show Edit Control (XP only) Constants are defined in FileConstants.au3 initial dir [optional] The full path of the folder you selected/highlighted when displaying dialogue (if it exists in the root folder). Default is blank (""). hwnd [optional] The window handle to use as the parent for this dialog. @@End@@ ###ReturnValue### @@ReturnTable@@ Success: the full path of the folder chosen. Failure: "" (empty string) and sets the @error flag to 1 if user cancels/closes the window. @@End@@ ###Remarks### The root dir will be chosen if the initial dir (if given) does not exist. A nonexistent root dir will also cause the Desktop folder to be root. Special Windows folders (such as "My Documents") can be set as root by using the right CLSID detailed in the Appendix. UNC paths are not supported. If you think that user's may choose files on a UNC path then the path needs to be mapped as a drive first. The new vista+ dialog style is used if possible, regardless of the Use New Dialog Style flag. With the vista dialog style the edit control and create folder buttons are always shown, ignoring the flags parameter, and the dialog text parameter sets the title of the window. ###Related### FileOpenDialog, FileSaveDialog ###Example### @@IncludeExample@@