Ali Alipour
Ali Alipour

Reputation: 61

Unzip a Password Protected file in SSIS

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

Answers (3)

kRISHNAgOPAL
kRISHNAgOPAL

Reputation: 1

I got it which actually worked for me.

We need to pass some parameter in the Execute Process task Editor

Click here for Execute Process task Editor image

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 extract
  • Source: D:\App\File\TextDoc.7z
  • password: 1234@Abcd
  • Destination: D:\App\File\Extract
  • r: this is for Read. means the extracted file file will be visible while extracting

Upvotes: 0

Ali Alipour
Ali Alipour

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

Pondlife
Pondlife

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

Related Questions