批处理文件递归删除具有特定名称的子目录
这个应该比较简单,这是我的情况;我已经从 subversion 存储库的本地副本复制了主干内容,我使用 SVN 客户端 Tortoise,它在每个子目录中创建名为“.svn”的隐藏文件夹。对于一般用途,并防止从一个颠覆服务器移动到另一个颠覆服务器时出现问题(否则我只会合并),我需要一些帮助来组合一个批处理文件,该文件将递归地遍历指定的目录并删除任何名为“.svn”的文件夹“ - 我可以写一些 C#,但我现在很忙,我可以想象这对 CMD 大师来说只是一句简单的话。有机会获得简单的答案和投票。请不要讨厌懒惰,我需要一个快速的解决方案,谢谢! <3
This should be relatively simple, here is my situation; I have copied the trunk contents from my local copy of subversion repositories, I use the SVN client Tortoise which creates hidden folders named ".svn" inside each subdirectory. For general use, and to prevent problems when moving from one subversion server to another (otherwise I would just merge), I would like some help putting together a batch file that will recursively go through the directory specified and delete any folders named ".svn" - I could write some C# but I am very busy at the minute and I can imagine this pretty much being a one liner for you CMD guru's. A chance to get easy answer and voteup. Please dont hate for being lazy I need a quick solution Thanks! <3
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是可能的,但不是必要的。
您应该使用 Tortoise 客户端将工作副本导出到另一个目录。
您可以拖放(右键单击),然后选择导出。
这会复制所有版本化文件,但不会创建 .svn 目录。
您也可以将目录直接删除。
It is possible, but not neccessary.
You should use the Tortoise client to export your working copy to another directory.
You can drag and drop (with a right click) and then select export.
This copy all versioned files, but creates no .svn directories.
You could also drop the directory at itself.