Jump to content

Open directories.


Recommended Posts

Is there any way to see the full path of all the directories open in windows explorer?

What do you mean by "Open Directories", Windows that are open, or Folders that have files in use by "explorer.exe"?

But when a long train of abuses and usurpations, pursuing invariably the same Object evinces a design to reduce them under absolute Despotism, it is their right, it is their duty, to throw off such Government, and to provide new Guards for their future security. - U.S. Declaration of Independence

Link to comment
Share on other sites

Not exactly sure what you mean.

Try the Autoit Window Information to see the directory of a file.

I have these folders open

D:\Documents and Settings\Maverick\My Documents\MamboV4.6.2

D:\Documents and Settings\Maverick\My Documents\demo

and

D:\Documents and Settings\Maverick\My Documents\Bluetooth

How could i tell in autoit which directories are open(so like if i open a new dir it would also show in au3) and their win handles?

can i do this with some sort of com object?

Link to comment
Share on other sites

you mean you want to know what directories are open with windows explorer? Be clearer when posting a question.

This works partially, since it won't show it if the option "show full path in address bar" isn't enabled or you are in a special folder, such as My Documents.

#include <array.au3>

$ExWin  = "[CLASS:ExploreWClass]"
$AddBar = "[CLASS:Edit; INSTANCE:1]"

$Explorers = WinList($ExWin)
Dim $DirsOp[$Explorers[0][0]]

For $i=1 To $Explorers[0][0]
    $DirsOp[$i-1] = ControlGetText($Explorers[$i][1],"",$AddBar)
Next

_ArrayDisplay($DirsOp)
Link to comment
Share on other sites

you mean you want to know what directories are open with windows explorer? Be clearer when posting a question.

This works partially, since it won't show it if the option "show full path in address bar" isn't enabled or you are in a special folder, such as My Documents.

#include <array.au3>

$ExWin  = "[CLASS:ExploreWClass]"
$AddBar = "[CLASS:Edit; INSTANCE:1]"

$Explorers = WinList($ExWin)
Dim $DirsOp[$Explorers[0][0]]

For $i=1 To $Explorers[0][0]
    $DirsOp[$i-1] = ControlGetText($Explorers[$i][1],"",$AddBar)
Next

_ArrayDisplay($DirsOp)
I need something like that but here are my limitations

the window name only has the folder name(Eg. Bluetooth)

no address bar.

Link to comment
Share on other sites

#include <array.au3>

$ExWin  = "[REGEXPCLASS:(Cabinet|Explore)WClass]"
$AddBar = "[CLASS:Edit; INSTANCE:1]"

$Explorers = WinList($ExWin)
Dim $DirsOp[$Explorers[0][0]]

For $i=1 To $Explorers[0][0]
    $DirsOp[$i-1] = ControlGetText($Explorers[$i][1],"",$AddBar)
Next

_ArrayDisplay($DirsOp)

This works better.. includes both explorer windows and "my computer" windows. Basically gets all the windows you have open that are either, then grabs what text is in the EDIT1 class (which is the address bar). So it shouldn't matter what's in the window title.

Thank Nahuel for the code.

EDIT: HAHAHA.. Nevermind.. I see that you have no address bar and the window title just shows the folder name without the path. Doh!

Edited by azure
Link to comment
Share on other sites

You could change it to show the full path in the titlebar.

Tools->Folder Options->View->display the full path in the title bar.

Another option playing around with AutoIT Window info, is even if you don't have display full path, it will still be available as hidden text.

Playing around more, the Edit1 control can still be addressed and read, even if hidden

On a folder c:\Downloads, with the address bar hidden, and title bar not showing full path,

AutoItSetOption("WinDetectHiddenText", 1)
MsgBox(0,ControlGetText("[Title:Downloads; Class:ExploreWClass]","","Edit1"),WinGetText("[Title:Downloads; Class:ExploreWClass]"))

Returns:

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

C:\Downloads

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

C:\Downloads

C:\Downloads

15 objects (Disk free space: 19.9 GB)

FolderView

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

OK

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

Edited by TurionAltec
Link to comment
Share on other sites

You could change it to show the full path in the titlebar.

Tools->Folder Options->View->display the full path in the title bar.

Another option playing around with AutoIT Window info, is even if you don't have display full path, it will still be available as hidden text.

Playing around more, the Edit1 control can still be addressed and read, even if hidden

On a folder c:\Downloads, with the address bar hidden, and title bar not showing full path,

AutoItSetOption("WinDetectHiddenText", 1)
MsgBox(0,ControlGetText("[Title:Downloads; Class:ExploreWClass]","","Edit1"),WinGetText("[Title:Downloads; Class:ExploreWClass]"))

Returns:

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

C:\Downloads

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

C:\Downloads

C:\Downloads

15 objects (Disk free space: 19.9 GB)

FolderView

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

OK

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

address bar cant be read is control isnt there.

hide your address bar

close that folder

open it again

theres no edit box

you get a whitespace

edit: and I cant change any settings on that user's machine

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