I need to extract all the subFolder(including subFolder of subfolders)

Try like this

system.IO.Directory.GetFiles(Environment.CurrentDirectory+"\Input\Banking Files\","*.*",SearchOption.AllDirectories)

Regards
Gokul

@manipreethi410
Change the folder datatype into
System.String[ array]

And check on this too

Directory.GetDirectories("",System.IO.SearchOption.AllDirectories)

Regards
Sudharsan

still the same error, do i need to download any package or import any namespace?

Have you changed the datatype of folder variable?

yes, am using array of string.

Hi @manipreethi410

Try like the below expression

Directory.GetDirectories("Yourpath","",System.IO.SearchOption.AllDirectories)

Regards
Gokul

Error is no more but am not getting any sub folder name form this.

Try this

Directory.GetDirectories(Directory.GetCurrentDirectory)

or

Directory.GetDirectories("youFolderPath","*.*",SearchOption.AllDirectories)

Regards
Sudharsan

Checkout this one

Hi @manipreethi410

Check out the XAML file

GetSubFolder.xaml (6.3 KB)

Regards
Gokul

1 Like

this helped me to get 1 folder’s subfolder. i need to get subfolder’s subfolder.

is that possible?

this helped me to get 1 folder’s subfolder. i need to get subfolder’s subfolder.

is that possible?

Check the workflow it will get all the subfolder @manipreethi410

I have received all the folders inside the folder have checked it untill the end

It will loop like

  • First root folders
  • Root Folder → Folder
  • Root Folder → Folder-> FOlder and etc

Regards
Sudharsan

1 Like

it is Fetching only A’s subfolder.

I need to get all the subfolders include A’s subfolder.

like how we will get the subfolders using for each folder folder.

working fine now. thank you so much

Thank you, this is also working.

thank you soo much!

Give some folder structure @manipreethi410

For me it getting all the folder and subfolder

thank you, am bad i dint check properly.

working fine.
thank you for your time.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.