Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rookie_sql
Constraint Violating Yak Guru
443 Posts |
Posted - 2009-01-22 : 11:23:56
|
HiI have a for each loop in a ssis package that read in about 500 files each week. What i'd like to know is there any way i can count the number of file that the for each loops reads in. Also am not to sure if this is correct but if a file is zero bytes does it be ingorned ? |
|
rgombina
Constraint Violating Yak Guru
319 Posts |
Posted - 2009-01-22 : 11:45:22
|
ForEach Loop File Enumeration will count even it's zero bytes. Use Script Task to determine if file with zero bytes to either ignore or not. You can create a variable to hold the count as it loops around. |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-22 : 11:49:04
|
yup you can. just use a variable to hold count and increment it inside foreach loop using script task.for igonre zero bytes files you can get size of file inside script task using file system object. |
 |
|
|
|
|