The SelectDir$ function displays the standard Browse for Folder dialog box and returns the user selection.
Used to prompt the user to select a folder.
var$=SelectDir$(<prompt>, <initial_folder>, <flag>)
<prompt>, string, prompt to display in the dialog box.
<initial_folder>, string, name of the initial folder to open. If the specified folder is invalid, the default folder is My computer.
<flag>, integer, indicates which type of resources are listed in the dialog box. The 1 value is recommended, which lists only the folders. The value 2 is for browsing network neighborhood. The value 8192 is for browsing printers.
var$, string, folder name selected by the user.
To provide a system-independent folder name which may not have the same name or location on any given system, you can use for <initial_folder> a CSIDL value used in C++.
' Folder selection starting at C:\wttest
mydir$=selectdir$("Select a folder","C:\wttest",1)