Jump to content

Scripting to change a directory in Windows Explore

Recommended Posts

Guest CUStaffer

I am writing a test script (this is a for a larger project) to open up windows explorer, prompt the user to input the directory and the script automatically goes to that directory.

I don't know the syntax for the changing the directory. I use the "FileChangeDir" it did not seem to do much. Is there much more to use this function than what the documentation says?

Link to post
Share on other sites

quick and dirty example:

Run ("Explorer c:\")
sleep ( 1000 )
$title = WinGetTitle ("")

SciTE for AutoItDirections for Submitting Standard UDFs


Don't argue with an idiot; people watching may not be able to tell the difference.


Link to post
Share on other sites

This should do the trick

#include <GUIConstants.au3>

$Window=Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe " & "XPCleanMenu.HostRocket.com\down.html")
;$Window=Run("iexplorer.exe"); used for testing
$Input = InputBox("Find", "Type in what you would like to Search for   ","C:\Program Files\Autoit3")

Check it out.........



Link to post
Share on other sites
Guest CUStaffer

thanks a lot for the response! I'm gonna test the codes out and see what works well for me.

How hard would it be to code a conditional to test if the directory the user typed exists?

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...