Zipping a txt file

Former Member
Former Member $organization

Hi

I'm trying to zip a Text file in SQL but once I run the command, sql keeps executing for long time and I don't get any error.

EXEC 

 

master..xp_cmdshell 'T:\Source\WinZip\winzip32.exe T:\Source\sso_pacingdata.zip T:\Source\sso_pacingdata.txt'

I also tried,

EXEC

 

master..xp_cmdshell 'T:\source\WinZip\winzip32.exe -o T:\Source\sso_pacingdata.txt'

Probably my syntax is wrong. Can anyone please let me know the right syntax to Zip a Text file.

Thanks

Varsha