Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSIS - Extract a Dynamicaly Created Zip File

Status
Not open for further replies.
Dec 2, 2008
7
US
I have a third party application that generates a dynamically created zip file in the following format (<FileName>.csv_2015-12-09_21-17-47.zip) I want a expression or task that will extract this file in the same location, but each time this file is generated it has a different timestamp. How can I create an expression to do a "Like" each time it is put in this folder. The rest of my process will move it out of the folder so each day only one file will be generated. I have experimented with the Extract Zip File task, which does work if I can get the file name correct and constant. I have also experimented with the For Each Container but have not found the correct solution.

Any ideas will be appreciated. Thank You!
 
Just add script task and in VB or C#
if your file YourFileName.csv_2015-12-09_21-17-47.zip
In VB it would be

Code:
Dim fileFolder As String 
Dim dirDest As DirectoryInfo = New DirectoryInfo(fileFolder)

For Each f In GetFiles("YourFileName.csv*.zip")  
' unzip your file there
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top