How to select specific folders from a path and open them?


How we can open specific folders from all folders from a path? And How can we go in sub folders of selected folders and get back to selected folder after getting a file from the sub folder?

We want to

open a folder of our choice from a path, then open its subfolder get a file

and return to main folder path and then open another folder and access its subfolder

and so on…
Any help would be appreciated.
Thanks in advance.

Hi @aliarshad2
use the floowing code to access the sfolders inside a folder


u will get a list of all folder path inside the folder_list variable

Nived N

1 Like

I need to get folders from a shared network path.

u mean from onedrive?

No, shared on local network


the code provided should work for both local and network folders.
You just have to provide the full folder path to the main folder (starting with \) rather than a mapped networ, because the second one doesn’t always work.


1 Like

yes, thanks