Hello,
I have a below -script component,Is it possible to use FileName variable ,build expression and use it in File connection manager?
I have multiple files at this path,I want to read each file and pass it to next component.
Is it possible to break loop and pass Filename to execute data flow task component,when this finish,I want to go back to script component read next file and run another data task component.
FileInfo fileinfo;
string[] files = Directory.GetFiles(Dts.Variables["User::folderpath"].Value.ToString());foreach (string file in files)
{
// Read the variable
string PackageName = (string)Dts.Variables["System::PackageName"].Value;
string FileName = Path.GetFileName(file);
Dts.Variables["User::FileName"].Value = FileName;
Dts.TaskResult = (int)ScriptResults.Success;
break;
}
chipsy