Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
bridge
Yak Posting Veteran
93 Posts |
Posted - 2005-06-02 : 05:01:10
|
| When I run this commandexec master..xp_cmdshell 'c:\program files\winzip\winzip32.exe –min –a –r -en c:\atlas\Users.zip c:\atlas\Users.txt'I got the errorC:\Program' is not recognized as an internal or external command,operable program or batch file.Please help me how can I resolve this isse |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-06-02 : 05:14:49
|
try putting the dos command into a .bat file an run that.Go with the flow & have fun! Else fight the flow |
 |
|
|
AndyB13
Aged Yak Warrior
583 Posts |
Posted - 2005-06-02 : 05:19:48
|
It needs to be encapsulated in quotes because of the space between program and filesexec master..xp_cmdshell '"c:\program files\winzip\winzip32.exe" –min –a –r -en c:\atlas\Users.zip c:\atlas\Users.txt' Edit:Double quotes "AndyBeauty is in the eyes of the beerholder |
 |
|
|
bridge
Yak Posting Veteran
93 Posts |
Posted - 2005-06-02 : 05:32:03
|
| "c:\program files\winzip\winzip32.exe" -min -a -r -en c:\ntest\Users.zip c:\ntest\Users.txtthis runs fine in batch fine but when I run exec master..xp_cmdshell '''c:\program files\winzip\winzip32.exe'' -min -a -r -en c:\ntest\Users.zip c:\ntest\Users.txt'it gives errorThe filename, directory name, or volume label syntax is incorrect.NULL |
 |
|
|
bridge
Yak Posting Veteran
93 Posts |
Posted - 2005-06-02 : 05:43:19
|
| But when I run this in query analyzer it keeps on running. I want to perform this task in a job please help me how may I do this. |
 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2005-06-02 : 05:46:42
|
| It's probably waiting to have the I Agree button clicked by the Service, which of course will never happen. You have to be very careful running windows apps under this context.There is a good free command line zip application here http://unxutils.sourceforge.net/DamianIta erat quando hic adveni. |
 |
|
|
bridge
Yak Posting Veteran
93 Posts |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2005-06-02 : 06:12:33
|
| Download the package, unzip it. The file you want has the highly unlikely name of.....zip.exeDamianIta erat quando hic adveni. |
 |
|
|
|
|
|