尝试使用SQL Server 2008 R2删除文件夹内容

时间:2011-09-15 06:17:01

标签: sql-server-2008-r2 xp-cmdshell

我正在从SQL查询编辑器执行xp_cmdshell以删除文件夹中的文件,但结果是获得两行;第一行包含消息"The system cannot find the file specified.",第二行包含"NULL"

我尝试过以下命令:

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 个答案:

没有答案