[英]Delete CVS folder from all subfolder in windows
I m new to bat file. 我是bat文件的新手。 I have folder suppose "A" and this folder has subfolder as "B", "C", "D" these folder again has there own subfolders. 我有文件夹假设“A”,这个文件夹有子文件夹为“B”,“C”,“D”这些文件夹再次有自己的子文件夹。 my problem is that each subfolders and parent folder have CVS folder , I want to delete that folder from each directories. 我的问题是每个子文件夹和父文件夹都有CVS文件夹,我想从每个目录中删除该文件夹。 How to do that in bat file. 如何在bat文件中执行此操作。
Go to the place where you want to delete all CVS folders. 转到要删除所有CVS文件夹的位置。 In windows in explorer, type "CVS" in the search box. 在资源管理器的Windows中,在搜索框中键入“CVS”。 And click enter. 然后单击Enter。 Select all, and delete. 选择全部,然后删除。 Now it is done. 现在已经完成了。 :) :)
这应该做的工作:
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S cvs') DO RMDIR /S /Q %%G
Try to do 试着做
cvs export -DNOW module_name
instead of 代替
cvs co module_name
Then you don't need to remove anything. 然后你不需要删除任何东西。
Usually you should use cvs export
to get a clean copy of the course without the working copy folders. 通常你应该使用cvs export
来获得一个干净的课程副本,而不需要工作副本文件夹。
But you can use a for
loop to remove those folders as well: 但您也可以使用for
循环来删除这些文件夹:
for /r /d %%f in (*) do if "%%f"=="CSV" rd /s /q "%%f"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.