无法使用 DOS 命令删除文件夹
我一直在尝试使用 DOS 命令删除 Windows XP 中存在的文件夹结构。 根文件夹 A 有两个文件夹 B 和 C 以及一个文件 F1。文件夹B和C分别有文件F2和F3。我正在从命令提示符执行命令 RD /s /q C:\XYZ\A 以删除文件夹 A 及其所有内容。这样做时,我收到错误,因为文件夹 B 和 C 正在被其他进程使用,因此无法访问它们。然而文件 F1、F2 和 F3 已被上述命令删除。如果我再次执行上述命令,那么文件夹 B 和 C 就会被删除,但 A 仍然存在。第三次执行该命令时,文件夹 A 也会被删除。 只需一次尝试,相同的场景就可以在另一台机器上正常运行。 谁能帮我解决这个问题。 提前致谢 问候, 阿尔皮特
I have been trying to delete a folder structure present in Windows XP using DOS command.
Root folder A has two folders B and C and a file F1. Folders B and C have files F2 and F3 respectively. I am executing the command RD /s /q C:\XYZ\A from the command prompt so as to delete the folder A and all its contents. On doing so I am getting the error as folders B and C cannot be accessed as they are being used by some other process. Howevere files F1, F2 and F3 have been deleted by the above command. If I again execute the above command then the fodlers B and C gets deleted but A remains. On executing the command for the third time, folder A also gets deleted.
Same scenario works fine on another machine in just one attempt.
Can anyone please help me in resolving the issue.
Thanks in advance
Regards,
Arpit
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题不在于 RD 命令。这是因为其他东西在删除过程中正在访问文件夹和/或文件。
确保没有正在运行的程序可能是罪魁祸首,资源管理器窗口在目录内打开(尽管这可能不会导致错误),并且您没有从文件夹结构内的 dos 提示符运行命令。
我认为没有人能够提供更多的见解,因为它将是特定于机器/安装的应用程序的。
The issue is not with the RD command. It's that something else is accessing a folder and/or file during the delete process.
Make sure there are no running programs that could be the culprit, explorer windows open inside the directory (although this may not cause an error) and that you're not running the command from a dos prompt that's inside the folder structure.
I don't think anyone will be able to give much more insight since it's going to be machine / installed applications specific.