INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

SSIS - Extract a Dynamicaly Created Zip File

SSIS - Extract a Dynamicaly Created Zip File

(OP)
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!

RE: SSIS - Extract a Dynamicaly Created Zip File

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 --> VB

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

For Each f In GetFiles("YourFileName.csv*.zip")  
' unzip your file there
Next 

RE: SSIS - Extract a Dynamicaly Created Zip File

you can do this with for each loop using file enumerator

1. use wildcard to get your filenames
2. store filename in variable
3. unzip your file using filename stored in variable

following thread will help you
http://sqlis.com/sqlis/post/Looping-over-files-wit...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close