0

I need to know if there is way i can get the full path of any folder using a python program when i navigate using file explorer.

Suppose i have opened file explorer and then i navigated to D: drive then i opened a folder Music, is there any way to get this path using python D:\Music

I want the python program to return me the path where I am currently at in the explorer.

For example If I open E drive in file explorer program should return E:
and in drive E if I click on Music folder the program should return E:\Music and if I go back one step from Music folder using back button in explorer the program should return E:\ again

  • As far as I know `os.getcwd()` of the `os` package does that but that works only if you move your way between folders using python, not on the explorer – DaSim Jan 27 '22 at 11:27
  • https://stackoverflow.com/questions/52563922/is-it-possible-to-check-if-a-folder-has-been-opened-on-windows-with-python may be this will help – Equinox Jan 27 '22 at 11:29
  • 1
    And if the user has more than one Explorer window open? – Anders Jan 27 '22 at 13:24

0 Answers0