2

I want to copy/paste the address of all the open Windows Explorer on Windows. Is there a way to do it in Python? I need to identify all the open folders and find the address of them.

Donald Li
  • 134
  • 1
  • 13
  • 1
    Maybe look at pywinauto if it's still a thing? Otherwise, can you provide your attempts at solving the problem? – g.d.d.c Jan 24 '20 at 23:41
  • You can get some information about all opened windows (see [Get HWND of each Window?](https://stackoverflow.com/questions/14653168/get-hwnd-of-each-window)), so it might be possible to determine which of them are Explorer windows and from those get the folder name in the window's title. – martineau Jan 25 '20 at 00:23
  • Don't have any attempts yet. Sorry. Just want to see if it's even considered a problem worth solving. – Donald Li Jan 25 '20 at 05:37
  • [Querying information from an Explorer window](https://devblogs.microsoft.com/oldnewthing/20040720-00/?p=38393). That's COM, you'll need to find a Python library that provides COM support. The individual steps of the solution are the same. – IInspectable Jan 25 '20 at 11:19
  • Forgot to link to the answer of the first part of the question: [A big little program: Monitoring Internet Explorer and Explorer windows, part 1: Enumeration](https://devblogs.microsoft.com/oldnewthing/20130610-00/?p=4133). Again, COM. But that's language-agnostic, so you can use practically any programming language, that can interface with a C interface. – IInspectable Jan 25 '20 at 13:17
  • Did you found any solution with psutil? – Hamza Mehboob Nov 03 '21 at 13:40

0 Answers0