Unzip password protected Zip file in SSIS
Does anyone know how to Unzip password protected files in an SSIS package?
We have an SSIS package that currently use java.util.zip to unzip zip file and has been working perfectly for some time now. They now want to password protect the files and unfortunetly this library cannot d开发者_运维知识库o it.
We are using a SQL server 2008 with .Net 3.5 on the windows server 2008 R2.
I have enjoyed using DotNetZip, it's free, has rich functionality and is well documented
DotNetZip
examples of using it in SSIS
You would have to write a C# script that has the password and you would be able to unzip it using the built in .Net library.
Use an execute process task and call winzip, IZArc or similar program you can drive from the command line. Use the expressions properties to dynamically set paths and passwords for the command line
PragmaticWorks have a "TF Compression Task" in their Task Factory suite which handles password protected zip files very nicely. You'll need to buy a sever license to use their suite in production, but you can download and use it free within VS2008 BIDS.
I've got a licensed copy of Task Factory and would recommend it to anyone who uses SSIS in a corporate environment.
精彩评论