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

Hi,

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

folder_list=Directory.GetDirectories(mainfolderpath)

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

Regards,
Nived N

1 Like

I need to get folders from a shared network path.

u mean from onedrive?

No, shared on local network

Hi,

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.

Regards,
Stefano

1 Like

yes, thanks

thanks