There's no simple way of doing this in the dataflow.
One way I might do this is to create the basic flatfile as you seem to know how to do, without the header and footer.
I would then use a script task to create a new file in which I would insert the Header, followed by the content of the file mentioned above, followed by the footer. The original flatfile can now be deleted.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]