Foreach not looping for each file

  • I have a Foreach container that is only looping for the first four files in a folder out of 15.

    I can see all 15 file when I use Windows Explorer and doing a dir in a command window lists all 15 files. The FileSpec is set to *.* so it should pick up everything.

    Any ideas on why it is not looping for all files or ideas on how to view what is going on for the actual foreach loop?

    Jez

  • Add a Script task and print out the variable

    Dts.Variables("VarName").Value.ToString()

    See what is the filename..... mostly it is bringing the filname in an incorrect format, i.e. with\without full path descriptor.

  • I've got that and the file name is fine.

    Digging a bit deeper, I have found some warnings elsewhere in the package and I suspect that the package is hitting the maxwarning number after 4 files which is why it is stopping at that point. I have been changing bits of the pacakge and I can get the foreach container to do more files when other bits are disabled so the problem is not with the foreach container but elsewhere.

    Thanks.

    Jez

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply