February 11, 2016 at 4:56 am
Hello,
In SSIS, I am using ExecuteProcessTask to unzip a zip file which is password protected.
The project is set to use 64bit
Have I got the parameters set correctly, because the unzip does not work? When I run this task, the winzip window comes up but nothing else happens. The task just keeps on running...
Executable:
C:\Program Files\WinZip\WINZIP64.EXE
Arguments:
-min -e -o -sPASSWORDNO \\WORK\1. Data\ZIPDirectory\FILENAME 2000.zip \\WORK\1. Data
Working Directory:
\\WORK\1. Data
February 11, 2016 at 5:36 am
I suggest you type the command directly in the command window and notet he output.
To verify whether it worked or not after the process task is executed check for the existence of the expected file.
If you have the option to use .net 4.5 or greater I would recommend writing a script task and using .net to unzip the file rather than running winzip via the execute process task.
February 11, 2016 at 8:35 am
bark stuff (2/11/2016)
I suggest you type the command directly in the command window and notet he output.To verify whether it worked or not after the process task is executed check for the existence of the expected file.
If you have the option to use .net 4.5 or greater I would recommend writing a script task and using .net to unzip the file rather than running winzip via the execute process task.
I have .net 4.5 and tried using the following code: note that it is password protected. how do I put password in this code please?
The message it gives is:
The file you are trying to open, zipFileName.zip, is in a different format than specified...
using System.IO;
using System.IO.Compression;
public void Main()
{
string zipPath = @"\\work\1. data\files\ZIP\zipFileName.zip";
string extractPath = @"\\work\1. data\files";
ZipFile.ExtractToDirectory(zipPath, extractPath);
Dts.TaskResult = (int)ScriptResults.Success;
}
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply