Show the path of all Explorer Windows

This piece of Python code shows the current path of all opened Explorer Windows

from win32com.client.gencache import EnsureDispatch

for w in EnsureDispatch("Shell.Application").Windows():
    print w.LocationName + "=" + w.LocationURL

I wanted to write a code, which can make use of a handler to a Windows Explorer Window, so that I can show a small Tooltip or anything else dynamically belonging to a selected Path of the User. But I think this is the better way. Hope someone alse can use this…

Also the output shows a path of Internet Explorer and Microsoft Outlook:

outlook:Posteingang outlook:Posteingang
Tools file:///C:/Users/me/Tools
Kurz notiert

May be we would need a detection here for Outlook or Internet Explorer.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.