问题
I got requirement to unzip a file which contains password protected text files in zip file.which have to be done in SSIS package..
I have googled and download a dll called Ionic.Zip to used in script task.
i have used the below code using c# in script task..
using Ionic.Zip;
public void Main()
{
Dts.TaskResult = (int)ScriptResults.Success;
start obj= new start();
obj.decrypt();
}
public class start
{
public void decrypt()
{
string sfilepath ="E:\\shekar\\CIF_Files\\USAGE.zip";
ZipFile fileToExtract = new ZipFile(sfilepath);
fileToExtract.Password = "ftp122";
fileToExtract.ExtractAll("E:\\shekar\\CIF_Files");
}
}
But i am getting an exception msg as below
I Had google a lot. but can't find correct solution. does any one prove me answer
回答1:
Take a look at the below. It will give you an idea of how it's being used in C# environment. Remember to check all the different Solutions:
link
来源:https://stackoverflow.com/questions/30936791/unzip-password-protected-file-in-ssis-using-ionic-zip-dll