get filename dynamically | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

get filename dynamically

Hi,
Using a ssis package I have several tasks.
A variable is also created called FileName.
There is a flat file connection called InputFileName.
initially when I designed the package, I hardcoded the pass of one of the .csv files into the path of the flatfile connection. There is a dataflow which has flatfile source and oledb destination. These two basically pickup the file and import into the database using mapping. So therefore the package works and data gets imported into the database. Then I used the variable to make the filename dynamic. So I removed the hardcoded connectionstring in the InputFileName. Is this the right thing to do to make the package dynamic? I would like to pass in any .csv filename and so the package runs.
My question is now that the connectionstring is deleted but instead placed an expression for the filename, then how does the system know which file to use? Thanks
]]>