尝试使用 SQL Server 2008 R2 删除文件夹内容
我正在从 SQL 查询编辑器执行 xp_cmdshell 来删除文件夹中的文件,但结果得到两行;第一行包含消息“系统找不到指定的文件。”
,第二行包含“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"'
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 message "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"'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论