August 26, 2007 at 12:01 pm
Hi,
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...>)
br
Helmut
August 27, 2007 at 1:44 pm
Helmut,
Daniel Read has a solution for you here: http://www.developerdotstar.com/community/node/512
This should get you going in the right direction.
Dan
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply