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"'
精彩评论