BUG: Only One Double-Quoted String Allowed in xp_cmdshell String

Article translations Article translations
Article ID: 266224 - View products that this article applies to.
This article was previously published under Q266224
BUG #: 58037 (SQLBUG_70)
BUG #: 217533 (SHILOH>
Expand all | Collapse all


Commands that are run by xp_cmdshell, which contain two or more parameters delimited by sets of double-quotes, do not run correctly. When you run the following command from the Query Analyzer:
EXEC master..xp_cmdshell '"C:\whats this\prgm.exe" -i "c:\test dir\SQL.txt"'
the following error message occurs:
'C:\whats' is not recognized as an internal or external command.


Create a batch file to run the operations and then run that batch file by using xp_cmdshell.


Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.


Article ID: 266224 - Last Review: October 17, 2003 - Revision: 3.2
  • Microsoft SQL Server 7.0 Standard Edition
  • Microsoft SQL Server 2000 Standard Edition
kbbug kbpending KB266224

Give Feedback


Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com