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
Thanks Ben, I tried this as well but same thing happens. It just keeps executing query without any result or any error.
Some of the SQL Forum say, it could be permission issue but as per my knowledge I have full access so can’t understand which permission is missing.
From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Ben Gu Sent: Wednesday, 1 December 2010 12:28 PM To: Varsha Karnik Subject: Re: [Tessitura Technical Forum] Zipping a txt file
Hi Varsha,
Good day.
My winzip is expired, so I cannot do the test for you,
but based on the web link http://www.memecode.com/docs/winzip.html
I think the syntax should be:
EXEC master..xp_cmdshell 'T:\Source\WinZip\winzip32.exe -o T:\Source\sso_pacingdata.zip T:\Source\sso_pacingdata.txt'
you should tell sql what to run: winzip32.exe
what is the option: -o
what is target file: sso_pacingdata.zip
what is source file: sso_pacingdata.tx
have fun.
Ben
From: Varsha Karnik <bounce-varshakarnik2805@tessituranetwork.com> Sent: 11/30/2010 6:59:10 PM
This message was sent automatically to you by www.tessituranetwork.com because you subscribed to the Tessitura Technical Forum. You may reply to this message to post to the Technical forum or visit the site to search, read and post to the forums. In the interest of keeping the forum posts from becoming cluttered, we encourage you to delete previous message text from your reply before sending. Thank you!