Sign in to follow this  
Followers 0
MythBusted

Windows explorer (or directory browser) help

6 posts in this topic

This is something that has probably been answered quite a few times, so I apologize for bringing it up once more. I've had limited luck searching for an answer.

I'm developing a script where I have an input control in my GUI. In this input box I ask the user for the path of the working directory. But rather than just have the user type the whole path, I'd like to have an option similar to any Windows application to be able to browse the mapped local and/or remote directories with a Windows explorer type of window, and have the user select the directory from this browser window. I haven't figured out a way to do this, so many thanks in advance for any help you can give me.

Thanks again!

Share this post


Link to post
Share on other sites



from the help file:

FileSelectFolder

--------------------------------------------------------------------------------

Initiates a Browse For Folder dialog.

FileSelectFolder ( "dialog text", "root dir" [, flag [, "initial dir"]] )

Parameters

dialog text Text greeting in dialog.

root dir Root directory of GUI file tree. Use "" for Desktop to be root.

flag [optional]

1 = Show Create Folder Button (requires IE6.0 or later)

2 = Use New Dialog Style (requires IE5.0 or later)

4 = Show Edit Control (to type a foldername)

initial dir Initial/start directory that will be selected if exist.

Return Value

Success: Returns full path of the folder chosen.

Failure: Returns "" (blank string) and sets @error to 1 if user cancels/closes the window.

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.

The "Create Folder Button" option may require Windows XP with IE6 in order to work.

Special Windows folders (such as "My Documents") can be set as root by using the right CLSID detailed in the Appendix.

Related

FileSaveDialog, FileOpenDialog

Example

$var = FileSelectFolder("Choose a folder.", "")

Share this post


Link to post
Share on other sites

This is something that has probably been answered quite a few times, so I apologize for bringing it up once more. I've had limited luck searching for an answer.

I'm developing a script where I have an input control in my GUI. In this input box I ask the user for the path of the working directory. But rather than just have the user type the whole path, I'd like to have an option similar to any Windows application to be able to browse the mapped local and/or remote directories with a Windows explorer type of window, and have the user select the directory from this browser window. I haven't figured out a way to do this, so many thanks in advance for any help you can give me.

Thanks again!

im not sure if the gui can be done but you could use a button to press then get that button to run the command

FileSelectFolder ( "dialog text", "root dir" [, flag [, "initial dir"]] )

Share this post


Link to post
Share on other sites

The brows for folder is a GUI that allows for one to select the folder they want. You can preset it so it has a default.

i think he means about putting the select folder as part of his own gui....

Share this post


Link to post
Share on other sites

"FileSelectFolder()" is exactly what I was looking for!!!!! Thanks so much for your help!!! :lmao:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0