Jump to content

Get path of open explorer windows?


Recommended Posts

I've been thinking about writing a utility for a while now, and basically what I want to do is run a loop of some sort to get the path of all open explorer windows into an array. Once I have that I can swap shells, kill explorer, then go through that array and open all the explorer windows back up.

It's kind of a weird request, but something I'd like to figure out how to do. I know how to get window handle and open and close the windows, but I'm not sure how to get the path of an explorer window. I've been using AutoIt v3 Window Info to look at explorer window info in Windows 7 and it shows "Address: C:\Media" in the 'Visible Text' area. So I *could* use _WinGetAltTabWinList to get all open windows, then essentially have the program alt-tab between all open windows, and do a search for the "Address: xxxxxxxxxx" in visible text and parse out the path.

That method isn't ideal by any means because it would require switching between all open applications before closing the explorer windows.

Does anyone else have a less kludgy idea, or a faster/less intensive solution?

Thanks

Edit: And ideally, I'd want this to work in XP and 7.

Edit 2: After some more searching I found this awesome function: http://www.autoitscript.com/forum/index.php?showtopic=89833

If I can pull something useful together with it I'll post up the code

Edited by cvocvo
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...