Iterate over a directory and then files of a particular directory

I have a folder name “input” inside that i have multiple folders and in that folder i have two type of folder one for excel file and one for .mht file.

So now i need to get the folder inside “input”
So suppose there are 3 folders inside “input” folder.Then my bot should 1st iterate throught the 1st folder then get the files of that particular folder.Then it should iterate to 2nd folder then the files of 2nd folder like this for the 3rd folder also.
I want the files of a particular folder one by one not all the files of a directory.

I have used variable of array type for getting the folders inside input folder

This gave me the folders name inside input folder.
Now i want to iterate through each folder and get the files of that particular folder.

Plss help

something like this
Sequence.xaml (7.6 KB)

loop over PathOfDir to get each subfolder then for each subfolder loop over each file


Try as below

Hope this will help you


I m not getting the files of these folder.while debugging i m getting error in files as files are not declared


Can you share your workflow screenshot?


Hi @Tabbu ,

Just made a very quick xaml.
Main.xaml (9.1 KB)

in InPath provide your root directory path
Check if that solves your purpose.