February 24, 2010 at 6:39 am
I'm trying to control the number of iterations within a Foreeach loop. I'm trying to obtain files from a folder and I only want to pull 10 files at a time. How do I control the number of iterations in a foreach loop?
Thanks in advance!
February 25, 2010 at 8:35 am
With Foreach File Enumerator, i believe we cant control untill and unless you define a file format say append a string to each file name which has a finite number of iteration and so.
my suggestion is use Script Task instead.
February 25, 2010 at 8:56 am
My approach would be to use a for each loop with a script and the other desired workflow process.... i would loop through all the files and use a script to get the count and then use a precedence constraint after the script and process only first 10 files
so you will need to write a script to count the files and use another variable(@var) to hold the count which can be later used in the precedence constraint..... @var<=10 .. that way you can process your first 10 files
February 25, 2010 at 6:28 pm
Thanks! From everything I have seen, that's about the only way!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply