Loop systematically stops after36 iteration

Hi Developers!

There’s something that is blowing my mind in these days!

I created a super simple process that:
0. Perform a loop for each item in a folder selected :
Loop .1. On a certain folder - the same selected before- (already opened in desktop) select and open the first document (they are all .txt) - I performed this action with a simple Double click!
Loop . 2. Check if a specific word is present on that file
Loop .3. If yes, the file tha trobot checked is moved to a “yes” folder, if “not” is moved to a “nope” one.

As far as this folder contains 5000 elements, i would expected 5000 iteration. Actually, this loop always stops after 36 iteration.
I really don’t understand why! Does any of you ever had the same problem?

SampleForResearch.xaml (2.0 KB) (Here you are the sample project!)

Thanks!

Fra-

1 Like

Your sample xaml is actually empty :frowning:

1 Like

So,
1.Create two directories “Yes” and “Nope” named…
2.Then in for each activity use"Directory.GetFiles(“FolderPath”)" then inside the body section of for each,use if condition to check as,“item.ToString.Contains(“SpecifiedValue”)”
3.If its true Copy that file(item will have the name of the file path with file name) using copy file activity by giving input as filepath(That is nothing but the item )…

1 Like

I figured out that I was looping on an element that was the string.count of the folderPath, so I just assigned the Directory.GetFiles(“folderPath”) value in loop and now is perfectly working! :slight_smile:

1 Like

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