Reputation: 61
I have problem with Unzipping a Password Protected file in a SSIS Package. I Always use Execute Process task But this time After the package download zip file from ftp it must unzip it then i use it as flat file. now the problem is i can't unzip the file cause its password protected.i have the password of file but i don't now how to use it. is there a command line or some thing?
Upvotes: 3
Views: 3678
Reputation: 1
I got it which actually worked for me.
We need to pass some parameter in the Execute Process task Editor
executable: C:\Program Files\7-Zip\7z.exe
[ Source where 7z is installed file]
Arguments: here we have to pass source, password (if any) & destination. followed by e
(i.e extract)
For example:
e "D:\App\File\TextDoc.7z" -p1234@Abcd -oD:\App\File\Extract * -r
Here
e
means extractD:\App\File\TextDoc.7z
1234@Abcd
D:\App\File\Extract
r
: this is for Read. means the extracted file file will be visible while extractingUpvotes: 0
Reputation: 61
Finally find it...
use a execute process task and set parameter as below:
executable : C:\Program Files\WinRAR\WinRAR.exe.....(winrar location)
Arguments : e -o+ -ppassword "filename"........i.e e -o+ -p12345 "D:\TRFolder\TR0426.zip"
Working Directory : D:\TRFolder ....... UnzipPath
peace
Upvotes: 1
Reputation: 16240
You need to find a command-line tool that can unzip password protected zip files, then you can use the Execute Process task as usual. If you don't want to hard-code the password into the SSIS package, you could put it in a package variable, populate the variable from a package configuration or a dtexec parameter, and then set the properties of the Execute Process task dynamically.
Upvotes: 1