When i try to execute a bat file using xp_CMDShell, i am getting a message as not recognized command.
Following is the command i executed:
EXEC master..xp_CMDShell 'C:\Documents and Settings\adcxqcv\Desktop\PQA\sample.bat'
I got a message as follows:
'C:\Documents' is not recognized as an internal or external command,
operable program or batch file.
NULL
Any Suggestions. Let me know how to execute a bat file inside a Stored Procedure. I am new to SQl Server.
Thanks, Vinu
Put the path inside ""
EXEC master..xp_CMDShell '"C:\Documents and Settings\adcxqcv\Desktop\PQA\sample.bat"'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With