SQLScholar
Programmer
Hey guys,
I have this code (BTW i have enabled xp_cmdshell):
and all i get back is:
File Not Found
however if i run dir /A-D /B c:\qr from cmdprompt i get a load of results.
I am running sql server 2008 r2 std with sp1.
Thanks
Dan
----------------------------------------
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss
Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
I have this code (BTW i have enabled xp_cmdshell):
Code:
CREATE TABLE #Files
(
[FileName] VARCHAR(256) NULL
)
INSERT INTO #Files([FileName]) EXEC xp_cmdshell 'dir /A-D /B c:\qr'
SELECT * FROM #Files
drop table #files
and all i get back is:
File Not Found
however if i run dir /A-D /B c:\qr from cmdprompt i get a load of results.
I am running sql server 2008 r2 std with sp1.
Thanks
Dan
----------------------------------------
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss
Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------