[SSIS] unzip a file in SQL server Integration services (SSIS) package

An assignment I was working on recently required me to unzip a file in an SSIS package. I didn’t knew it – so I asked my mentor Rushabh Mehta sir about it and he was kind enough to email me a demo. Now based on the deemo, my next task was to input couple of configuration’s like location of zipped file and then i was good to go! And so i learned something new, and I just thought of documenting it.

Aim: To unzip a file in an SSIS package

SSIS Task used: I’ll be using the Execute process task to carry out the task.

Now, here is the configuration of the Execute process task.

Executable: C:\Program Files\WinRAR\WinRAR.exe

[complete path of the executable. I have used WinRar to unzip a file – you could any valid tool you wish]

Arguments: e voila.zip  -o+

[General format: e <filename> –o+]

WorkingDirectory: D:\blogpsot\

[Path of the working directory. The file will be unzipped at the same location. If you wish to unzip at different location, you could use something like:

e “D:\blogpost\voila.zip” “D:\blogpost2\” –o+

and leave the WorkingDirectory blank, Then in this case the file will be unzipped at D:\blogpost2\ ]

Now,  here is the screenshot of the configuration. Just in case:

image

So yeah, happy unzipping!

Related links:

Execute process task

About these ads

6 thoughts on “[SSIS] unzip a file in SQL server Integration services (SSIS) package

  1. In the above screen shot : Arguments you can use : -C -Z ” Zip file location ” will take care, Fyi : It’s another option only

  2. Hi Parasdoshi,
    I was looking for this solution for last 5 hours, finally this post solved my issued.. Thanks a lot man.

    Thanks,
    Anil

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s