I m new to bat file. I have folder suppose "A" and this folder has subfolder as "B", "C", "D" these folder again has there own subfolders. my problem is that each subfolders and parent folder have CVS folder , I want to delete that folder from each directories. How to do that in bat file.
CD [Your_Folder] && RMDIR /S /Q . From Windows Command-Line Reference: /S: Deletes a directory tree (the specified directory and all its subdirectories, including all files).
Remove the file from your working copy of the directory. You can for instance use rm . Use ' cvs remove filename ' to tell CVS that you really want to delete the file. Use ' cvs commit filename ' to actually perform the removal of the file from the repository.
To quicken up this process, Click Ctrl + A, Highlight all the files (that you want to move) and right click, Cut and Paste the files to the desired directory.
To remove a directory and all its contents, including any subdirectories and files, use the rm command with the recursive option, -r . Directories that are removed with the rmdir command cannot be recovered, nor can directories and their contents removed with the rm -r command.
Go to the place where you want to delete all CVS folders. In windows in explorer, type "CVS" in the search box. And click enter. Select all, and delete. Now it is done. :)
This should do the job:
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S cvs') DO RMDIR /S /Q %%G
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With