在 Windows CMD 上递归删除文件或文件夹 [英] Delete files or folder recursively on Windows CMD
本文介绍了在 Windows CMD 上递归删除文件或文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在 Windows 上从命令行递归删除文件或文件夹?
How do I delete files or folders recursively on Windows from the command line?
我找到了这个解决方案,我们在命令行上驱动路径并运行这个命令.
I have found this solution where path we drive on the command line and run this command.
我给出了一个带有 .svn 文件扩展名文件夹的示例:
I have given an example with a .svn file extension folder:
for /r %R in (.svn) do if exist %R (rd /s /q "%R")
推荐答案
其他答案对我不起作用,但这对我有用:
The other answers didn't work for me, but this did:
del /s /q *.svn
rmdir /s /q *.svn
/q 禁用是/否提示
/s 表示从所有子目录中删除文件.
/s means delete the file(s) from all subdirectories.
这篇关于在 Windows CMD 上递归删除文件或文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文