How to loop Process in a Multiple Folders

Hi i wanted to Loop the process in a multiple folder

kindly see image Below.

I have 6 folders and 1 .txt file, But i wanted only to loop the process in the Folders that contains “Linia” and its number.

Note: The Folder Linia is a dynamic Folder it Could be up to Linia 100

1st Loop
Linia 1 Folder

2nd Loop
Linia 2 Folder

3rd Loop
Linia 3 Folder

Thank you in advance

try this expression, to get the paths and files within the folders

arr_Folders = Directory.GetFiles(“YourFolderPath”, “.”, SearchOption.AllDirectories)
then loop through arr_Folders, and check if the item contains the word “Linia” if yes then get the files, else just ignore it




Hi @Vincent_Nuestro

You can use For each File in Folder activity

Inside this try to use if condition

Have a look on the workflow

ForeachfileinFolder.xaml (7.7 KB)


Hi @fernando_zuluaga

I already try this method and I think i need more condition in order for me to Loop the process per Linia folder.

Process 1 = Linia folder 1
Process 2 = Linia folder 2

Hi @Gokul001

Thanks for this, but it it looks like it didnt work well,

If you can see the below Image
I have 2 csv file for processing in Linia 1

But the loop process only 1 item and it process the Linia 3 already

@Vincent_Nuestro You can get the folders named with only Linia by passing this in the partial Name variable . See the below screenshot

Please check the workflow below

Get Specific (2.6 KB)