• After spending almost another entire day trying to force the idea to use a data flow task with a Script Component, I had to look for another method because I couldn't get anyone's C#/VB code to work. I'm not a complete code newbie. I played with and modified a lot of other people's code today. I worked out a lot of the errors but there was always something that I couldn't get past.

    I don't know if this is the cleanest (best) way to do this but I ended up using a Script Task instead and inserted this code and now I have the footer I'm looking for in my flat file...

    public void Main()

    {

    ConnectionManager cm = Dts.Connections["SLVEXT.txt"];

    var path = cm.ConnectionString;

    var textToWrite = (string)Dts.Variables["User::footer"].Value;

    System.IO.File.AppendAllText(path, textToWrite);

    Dts.TaskResult = (int)ScriptResults.Success;

    }