Sunday, February 19, 2012

For Each File - Limiting Files

Thanks everyone

I have another question. If I use FOr Each Loop Container (For each file Enumerator), it will select all the files in that folder. What if I want to select just 100 files (assuming 500 files in the folder)

How do i do this?

Thanks

while there is no way to terminate loop early, you can stop your task from executing by using precedence constraints with expressions: create a variable that will be incremented each time inside the loop by a script task in the beginning of the loop, connect your task to this script task with precedence constrain and set precedence constrain expression to @.fileCount <= 100. The task will be executed only 100 times.

No comments:

Post a Comment