Delete CVS folder from any subfolder in windows

I am updating the bat file. I have a folder "A", and in this folder there is a subfolder like "B", "C", "D", this folder again has its own subfolders. my problem is that in every subfolder and parent folder there is a CVS folder, I want to delete this folder from all directories. How to do this in bat file.

+6
source share
4 answers

Go to the place where you want to delete all CVS folders. In the window in Explorer, enter "CVS" in the search field. And press enter. Select all and delete. Now everything is done. :)

+16
source

This should complete the task:

FOR /F "tokens=*" %%G IN ('DIR /B /AD /S cvs') DO RMDIR /S /Q %%G 
+2
source

Try to do

 cvs export -DNOW module_name 

instead

 cvs co module_name 

Then you do not need to delete anything.

+1
source

Normally you should use cvs export to get a clean copy of the course without working copy folders.

But you can also use a for loop to delete these folders:

 for /r /d %%f in (*) do if "%%f"=="CSV" rd /s /q "%%f" 
0
source

Source: https://habr.com/ru/post/921666/


All Articles