question

zain001 avatar image
zain001 asked

7-zip command line

I am trying to unzip files by using 7-zip in ssis. Can anyone help me with below error. > [Execute Process Task] Error: In > Executing "C:\\Program > Files\\7-Zip\\7z.exe" "e > -o\\server\\extract\\ -aoa" at "", The process exit code was "7" while the > expected was "0"
ssiszip
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jason Crider avatar image
Jason Crider answered
check your path on that. C:\\Program Files\\7-zip\\7z.exe?
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

It is correct.
0 Likes 0 ·
Fatherjack avatar image
Fatherjack answered
Is 7zip unzipping 7 files? Did it unzip whatever it was set to correctly? It may simply be a case of setting the script task to expect a 7 rather than a 0 as the success output. check 7zip's instructions for its output values when executed from the command prompt
7 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

No, it is unzipping 1 file at a time. Success value is set to '0' only when the file is unzipped. But, it is not unzipping. It just gives the above mentioned error
0 Likes 0 ·
so you need to handle the error. It seems that 7zip is failing to execute successfully and you need to handle that scenario in your package. What do you want to happen - an email to someone to alert of the situation? Write the error to a log file somewhere? ...
0 Likes 0 ·
It is not unzipping the files. I want to fix that. The alert/email is done.
0 Likes 0 ·
So you dont actually want help with the SSIS error, you want help with getting 7zip to work ... Your 7zip installation should have installed a compiled help file - 7-zip.chm. open this and read the Command Line section. error 7 relates to a command line error. I would re-check your syntax and ensure it fits with the recommended method. If you can get it working from a command prompt then take that syntax into SSIS.
0 Likes 0 ·
-aoa is not a valid switch
0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.