I have a directory with many sub-directories. In each folder there is a subversion folder (.svn).
Is there a command in windows that will go through each folder and sub-directory and delete the .svn folder?
Or will I have to create a script or do it manually?
The find command returns a list of all the subfolders matching “. svn”, and this is then piped to the rm command to recursively delete the directory. Running rm using the full path will remove the confirmation prompt, and the “rf” arguments will recursively delete any folder contents.
To remove a file from a Subversion repository, change to the directory with its working copy and run the following command: svn delete file… Similarly, to remove a directory and all files that are in it, type: svn delete directory…
Right click the any folder and choose TortoiseSVN -> Repo Browser. Then point to your local repository in the URL field. Once open you could be able to browse the repo, and with a right click, delete the folder.
Make a litte batch file with the following line and execute it from the parent folder under which there are .svn directories.
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S *.svn*') DO RMDIR /S /Q "%%G"
You can also issue the line below straight from the Command Prompt:
FOR /F "tokens=*" %G IN ('DIR /B /AD /S *.svn*') 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