About This File
_cFileSelectFolder() is intended as a replacement for native FileSelectFolder() for selecting folders: It implements the left pane of FileSelectFolder(), and goes beyond FileSelectFolder() in several ways.
• It is user friendly and designed to be easy to use;
• New folder, Delete folder and Rename folder controls are optional;
• Its GUI can be placed anywhere, including centred on another window;
• Neither needs nor uses CLSIDs;
• Checks calling parameters rigorously, with the user choosing either to show error messages in a dialog or to set @error and return them to the caller;
• For local and mapped drives, accepts file specifications with drives that can be drive letters, drive labels, or both,
• For local and mapped drives, always returns drive letter:\ ...\ so its output is compatible with native AutoIt functions.
• For UNC paths, returns \\computer\share\...\
• For unmapped drives on computers on the network, offers a shortcut to shares.
• Selecting a treeview item to be highlighted initially is specified in a user-friendly way, including a diagnostic for when the user gets it wrong
• Because it can be called with many arguments, a user can show a list of the arguments / parameters and their values
The root of the treeview can be:
• The Desktop hierarchy with Desktop at the top
• Partial Desktop hierarchy with any other Desktop item at the top, with or without local/mapped drives and file folders, or remote shares and file folders (as appropriate),
• Local/mapped drives and file folders, or
• Remote shares and folders.
The script and example scripts are in the zip file. Documentation beyond what is in the UDF header is in the PDF file, cFileSelectFolder 1_5_0.pdf
Comments and suggestions are most welcome.
What's New in Version 1.5.0
1.3.0 Added $sInitialTree to specify a treeview item to be selected initially, including diagnostic feature. A SCRIPT-BREAKING CHANGE
Non-persistent mapped drives are handled
Improved error reporting where a short-cut letter for a share does not exist
Checks for access to remote computer by pinging it
No longer depends on readiness of remote drive as an indication of accessibility
Improved error reporting for shares
Enumerating Resources now uses globally allocated buffer per Microsoft
When Global $g_bFSF_ShowArguments is declared in user code, arguments/parameters are shown: a diagnostic aid
1.4.0 Added $iFolder parameter to make New folder, Delete folder and Rename folder buttons optional. A SCRIPT BREAKING CHANGE
Added detection of errors in the types of parameter values
1.4.1 On entry, disables parent dialog and re-enables/activates it when function returns
1.4.2 When $sInitialTree is specified, collapses all other leaves at this level
1.5.0 Handles non-standard items under Desktop > @UserName