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:
So yeah, happy unzipping!
Related links:
In the above screen shot : Arguments you can use : -C -Z ” Zip file location ” will take care, Fyi : It’s another option only
Thank you – and it was nice meeting you at North Texas SQL server UG!
Hi Parasdoshi,
I was looking for this solution for last 5 hours, finally this post solved my issued.. Thanks a lot man.
Thanks,
Anil
you’re welcome!
Thank you for this solution!!!
you’re welcome!