|  | Posted by John Bell on 09/09/05 11:16 
Hi
 Enquote the filename with double quotes should have worked, therefore the
 file may not exist or could be still open. If  "\\servername\d$\The
 File\sub\filename.dat" from a command prompt  says the file does not exist
 then it probably doesn't or permissions are wrong.
 
 If this is a batch file you may want to use a more appropriate extension.
 
 John
 
 "phantom" <phantomtoe@yahoo.com> wrote in message
 news:1126224325.956647.140030@g43g2000cwa.googlegroups.com...
 > Greetings,
 >
 > I have a sp that dumps text into a textfile but I am having trouble
 > creating the textfile.
 >
 > EXEC master.dbo.xp_cmdShell '\\servername\d$\The File\sub\filename.dat'
 >
 > The directory "The File" has a space in it.  I've tried putting the
 > carat ^ before the space, and putting double quotes...but I keep
 > getting this error
 >
 > '\\servername\d$\The' is not recognized as an internal or external
 > command, operable program or batch file.
 >
 > If I do EXEC master.dbo.xp_cmdShell '"\\servername\d$\The
 > File\sub\filename.dat"' I get the same thing.
 >
 > If I do EXEC master.dbo.xp_cmdShell '""\\servername\d$\The
 > File\sub\filename.dat""' I get
 >
 > '"\\servername\d$\The File\sub\filename.dat"'
 > is not recognized as an internal or external command, operable program
 > or batch file.
 >
 > Does anybody see what I am doing wrong?
 >
  Navigation: [Reply to this message] |