ASpeak IOpine!

Delete .svn folders recursively

Posted on December 3, 2008

Very often scenarios crop up when we want to clean our mammoth source code repository without having to export it elsewhere. I was looking for an elegant way to delete hidden .svn folders which are created by tortoise svn to keep track of the repository state on the client. I found this site which provided an elegant way which precisely meets my requirement.

I modified a minor glitch in the command to enable directory deletion from the folders which contain a space in name.

FOR /F "tokens=*" %%G IN ('DIR /B /AD /S *.svn*') DO RMDIR /S /Q "%%G"

Link: http://blog.snakehit.be/2007/08/29/svn-recursively-delete-svn-folders