ForEachFile loop in SISS package (SQL 2005)
I have a ForEach loop container that iterates over a set of flat files in a specific folder. For each iteration, I would like to include a script event that checks the first character in the file name. I have created an Event handler for the ForEach container. Inside this event handler I added a Script task....but HOW can I reach the variable from this script, that is the variable that holds the filename for each of the iteration the ForEach container control does.
So, in the simple code underneath, how can I reference the variable name "User:myFileVar" that I have declared underneath properties section for the ForEachLoop control ???
ALSO - if I find a file among the ones I have in my directory I'm reading that I DONT want to do anything with, HOW can I make the ForEachLoop control to "jump" to the next file without continuing processing the current file ??
Dim oFile As System.IO.File
Dim oWrite As System.IO.StreamWriter
oWrite = oFile.CreateText("C:\sisslog.txt")
oWrite.WriteLine(<HERE I WOULD LIKE TO PRINT THE FILE NAME OF THE FILE THAT ARE CURRENTLY PROCESSED...>)
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)