Search and get a sub folder from unknown folders

Hello all,

I would like help in checking if Folder path exists :- C:/users/documents/folder/TO 4567

where “folder” is unknown and can be a unique name.

Kindly suggest please.

1 Like

use folder exists activity

set folder path = "C:/users/documents/"+folder+"/TO 4567"
where “folder” = string variable

Hi

Hope the below steps would Help you resolve this

  1. Use a assign activity like this

arr_directory = Directory.GetDirectories(“c:/users/documents/”,
“*", SearchOption.AllDirectories)

Where arr_directory is a variable of type array of string

  1. Now use a FOR EACH activity and pass the above array variable as input and change the type argument as string

  2. Inside the loop use a IF condition like this

item.ToString.Contains(“C:/users/documents”) AND item.ToString.Contains(“TO 4567”)

If true it goes to then block where you can continue further

Cheers @Yugal_Raju

Is this working fine now @Yugal_Raju

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