Logic Please

I have a scenario where we have a folder which has many folder and each folder has a excel file in it

Input here is:
Input file path will be given

It must process the files under the multiple folder in that folder

Hi @Sweety_Girl

Please see here for some clues :slight_smile:

1 Like

First get the folders inside the parent folder using Directory.GetFiles and store in a string array @Sweety_Girl,

Then use for loop to loop through the array, within that for loop another directory.getFiles to loop through the each child folder and get the excel file inside. Then process the excel as you need



Hi @Sweety_Girl,
Use like this…

Get the directories first and check the count of the files in it if greater than 0 then it has files otherwise directory, so in else condition check check for files again.

1 Like

And I have another condition

Inside that folder we must access only particular 6 folders

How to check the folder name whether it is one among the 6 folders

Same thing, just a if condition,

If item.tostring = “Folder Name”


Okay …
We must use OR condition for that 6 folder and use it?

I suppose you could use a Switch activity and place each folder name as a condition for that Switch.



If item.tostring = “folder1” or item.tostring = “folder2” or item.tostring = “folder3”

we can use that @Sweety_Girl

1 Like

If we use switch, the excel files under that particular folder will be added to queue separately

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