how to unzip rar files which are in remote server

2019-09-09 21:33发布

I have .rar files in network folder and I need to unzip rar files and store as .bak files into remote server. I have used execute process task and passed expressions but when I am executing task getting error as The process exit code was "2" while the expected was "0".

I have googled the error but did not find how to fix this. Please can anyone suggest me how to do this.

Below are the expressions I used

Executable : C:\Program Files\7-Zip\7z.exe

Arguments : x \\NETWORK-SQLBACKUP\ACCOUNTS\Monthly\CustomerDB\CustomerDB_backup_2015_08_31_203001_4545366.rar -o\\SDL-VR-DBSBACKUP\F:\Monthly bak files\CustomerDB_backup_2015_08_31_203001_4545366

Thanks.

标签: ssis
1条回答
男人必须洒脱
2楼-- · 2019-09-09 22:17

7zip, error code 2 means 'fatal error'. You may need to wrap the output file in quotation marks because it contains spaces. A good way to test it is running it from the command line manually and make sure it works, once you are happy with the result you can try it from a SSIS task.:

"C:\Program Files\7-Zip\7z.exe" x \\NETWORK-SQLBACKUP\ACCOUNTS\Monthly\CustomerDB\CustomerDB_backup_2015_08_31_203001_4545366.rar -o"\\SDL-VR-DBSBACKUP\F:\Monthly bak files\CustomerDB_backup_2015_08_31_203001_4545366"

查看更多
登录 后发表回答