开发者

Trying to delete folder contents using SQL Server 2008 R2

开发者 https://www.devze.com 2023-04-05 04:31 出处:网络
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 th

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

精彩评论

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