I have a folder having multiple files with the name as
The name is in the format P04_systemdate_*.zip.
I want to pick the folder containing currentdate in the name and unzip it first and load the data from extracted file into the table.eg : file named as A.txt goes into table A, filenamed as B goes into table B and so on...
I guess you have already done the following:
flat file source, and
flat file sourceto point to one of your files and connect all the appropriate columns so that data flows from file to database.
If all of this is already working, then let's do the For-Each loop
CsvFileNameof type string
ForEach loop(not a For loop)
Foreach File Enumerator
FlatFileSource, and choose properties
ConnectionStringproperty to use the "CsvFileName" variable
Run it. This should load all files. Now, if you just want to restrict it to a date here's what you do:
"*" + @[User::FilterDate] + "*.csv"
Now it will only filter the files that you want.