简体   繁体   English

从Windows中的所有子文件夹中删除CVS文件夹

[英]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.

相关问题 从每个子文件夹Windows Shell删除所有文件/目录 - Delete all file/directories from each subfolder windows shell 从当前文件夹中的所有文件以及子文件夹Windows批处理中的文件中删除前缀 - Remove Prefix from all file in current folder as well as files in subfolder windows batch 命令行删除 Windows 中带有 Subfolder/*/FolderToDelete 的所有文件夹? - Command line to delete all folders with Subfolder/*/FolderToDelete in Windows? 从文件夹中删除文件[Windows] - Delete files from folder [Windows] 如何使用Windows Batch Scripting从文件夹“A”中删除文件夹“A”中的所有文件/文件夹? - How to delete all files/folders from a folder 'A' which are not present in the folder 'B', using Windows Batch Scripting? 如何判断一个文件夹是否是特殊Windows文件夹的子文件夹? - How to tell if a folder is a subfolder of a special Windows folder? 如何使用 python 真正删除文件夹中的所有文件和 Windows 上的文件夹? - How to really delete all files in a folder and the folder on Windows using python? Nsis Delete文件夹和子文件夹-安装程序目录中 - Nsis delete folder & subfolder — inside installer directory 如何使用 C# 从 windows Temp 文件夹中删除所有文件? (当进程运行时) - How do you delete all files from the windows Temp folder using C#? (When the processes are running) 如何从Linux中删除远程Windows中的文件夹 - How to delete a folder in remote Windows from Linux
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM