Jump to content

Finding Files In The Windows Filesystem


kesin
 Share

Recommended Posts

I'm in the process of writing a script to simplify use of a command line utility. As parameters the utility requires that the user pass in file names and locations. What I was wondering is if anyone has a method of using something similar to the browse frature on instilation programs that will allow the user to use a GUI to browse through the file system to the files that they are looking for. I'd rather not have to reinvent the wheel as it were to accomplish this.

Forgive me if how to do this already exists in the forums somewhere in the forums but i have been unable to find anything. Any help you guys could provide would be much appreciated.

Kesin

Link to comment
Share on other sites

I'm in the process of writing a script to simplify use of a command line utility. As parameters the utility requires that the user pass in file names and locations. What I was wondering is if anyone has a method of using something similar to the browse frature on instilation programs that will allow the user to use a GUI to browse through the file system to the files that they are looking for. I'd rather not have to reinvent the wheel as it were to accomplish this.

Forgive me if how to do this already exists in the forums somewhere in the forums but i have been unable to find anything. Any help you guys could provide would be much appreciated.

Kesin

If I am understanding correctly you need something like FileOpenDialog


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Interesting Scruits, I may end up using them in some future endavors, but not quite what I am looking for right now. What I am looking to do is create buttons that perform the same function as the browse button in the script compiler.

Link to comment
Share on other sites

It looks like that's precisely what i was looking for.

Thanks Much

Here is a rough example

#include <GUIConstants.au3>
$Form1 = GUICreate("AForm1", 328, 173, 192, 125)
$Input1 = GUICtrlCreateInput("", 32, 56, 169, 21)
$Button1 = GUICtrlCreateButton("Browse", 224, 56, 57, 25, 0)
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Button1
        $select = FileOpenDialog( "Select File", "c:\" , "All(*.*)")
        ControlSetText( "", "", $Input1, $select)
    Case Else
    ;;;;;;;
    EndSelect
WEnd


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...