Link to home
Start Free TrialLog in
Avatar of LIULIHUA
LIULIHUA

asked on

How to unzip files in DTS package?


Hi experts,

I have a DTS package. and need to upzip all the zipped files in a directory. I just followed the scripts that  "arbert" solution given out in 2004 march 29. however, I didn't get it through by following like this:


EXEC master..xp_cmdshell C:\Progra~1\utility\WinZip\winzip32 -e
'C:\DATA\FTP_Download\ca_account_sales_org.zip C:\DATA\FTP_Download\'
go

Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '\'.

Please help


Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image


EXEC master..xp_cmdshell "C:\Progra~1\utility\WinZip\winzip32 -e
'C:\DATA\FTP_Download\ca_account_sales_org.zip C:\DATA\FTP_Download\'"
EXEC master..xp_cmdshell "C:\Progra~1\utility\WinZip\winzip32 -e C:\DATA\FTP_Download\ca_account_sales_org.zip C:\DATA\FTP_Download\ "
Avatar of LIULIHUA
LIULIHUA

ASKER

This is not works.

It hangs:

EXEC master..xp_cmdshell "C:\Progra~1\utility\WinZip\winzip32 -e
'C:\DATA\FTP_Download\ca_account_sales_org.zip C:\DATA\FTP_Download\'"

I have to kill it.

Hi aneeshattingal,

EXEC master..xp_cmdshell "C:\Progra~1\utility\WinZip\winzip32 -e C:\DATA\FTP_Download\ca_account_sales_org.zip C:\DATA\FTP_Download\ "

this is not work neither, it hangs too.
EXEC master..xp_cmdshell "C:\Progra~1\utility\WinZip\winzip32 -e
'C:\DATA\FTP_Do~1\ca_acc~1.zip C:\DATA\FTP_Do~1\'"

It hangs again.
Hi aneeshattingal,

Do you have time to this issue?

I have no idea why it is not working, I know the code should be run. Any help appreciate.

Hi experts,

I tried the following command at C:\prompt at my laptop which has SQL server indevidual version installed and it works.

C:>C:\progra~1\utility\Winzip\Winzip32 -e C:\DATA\FTPDownload\ca_accounts.zip C:\DATA\FTPDownload\

However, when I copy the same code to SQL Query Analyzer, it give me an error:

Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '\'.
Server: Msg 132, Level 15, State 1, Line 2
The label 'C' has already been declared. Label names must be unique within a query batch or stored procedure.
Server: Msg 132, Level 15, State 1, Line 2
The label 'C' has already been declared. Label names must be unique within a query batch or stored procedure.

Any help would appraciate
ASKER CERTIFIED SOLUTION
Avatar of nito8300
nito8300
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi nito8300,

Thank you for the valuable feedback, this is really big help.
welcome