开发者

Trying to delete folder contents using SQL Server 2008 R2

I am executing xp_cmdshell from the SQL query editor to delete a file in a folder but getting a two rows as result; the first row contains a me开发者_StackOverflow社区ssage "The system cannot find the file specified." and second row contains "NULL"

I have tried following commands :

EXEC xp_cmdshell 'DEL C:\Documents and Settings\Administrator\Desktop\rough folder\hi.txt'

EXEC xp_cmdshell 'DEL "C:\Documents and Settings\Administrator\Desktop\rough folder\hi.txt"'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜