Absolutely. Using a script component is the easiest way I found to do it. I had played around with writing the data I wanted to a text file using a flat file destination, then using a script task to append a header and footer. You could do that if you like.
I found it was simpler to just do it in one step, i.e. route your data flow into a script task which writes the header in PreExecute, and all the data rows in ProcessInputRow, and optionally a footer in PostExecute.
Something like this;
TextWriter tw;
public override void PreExecute()
{
base.PreExecute();
tw = new StreamWriter(Variables.requestFname);
tw.WriteLine("HEADER");
}
public override void Input0_ProcessInputRow(Input0Buffer Row)
{
tw.WriteLine(Row.WhateverFieldsYouNeed);
}
public override void PostExecute()
{
base.PostExecute();
tw.WriteLine("FOOTER");
tw.Close();
}