• Recursively remove .svn folders from checked out projects in Subversion

    by  • December 3, 2009 • batch file, subversion • 0 Comments

    Thought I would post this as I find I need it regularly. This is thanks to a great blog post over at http://perezj.blogspot.com/2008/10/delete-svn-folders-files-recursive.html which details how to write a batch file which recursively removes .svn folders from a checked out folder from Subversion. It boils down to the following:

    1. Create a batch file in checked out folder

    2. Edit the batch file, then copy and paste the following text: FOR /F "tokens=*" %%G IN ('DIR /B /AD /S *.svn*') DO RMDIR /S /Q "%%G"

    3. Open a command prompt, navigate to the folder you checked out and type in the name of the batch file. Watch as it iterates through and removes all .svn folders :)


    .NET developer at thetrainline.com, previously web developer at MRM Meteorite. Awarded a PhD in misbehaviour detection in wireless ad-hoc networks. A keen C# ASP.net developer bridging the gap with APIs and JavaScript frameworks, one web app at a time.


    Leave a Reply

    Your email address will not be published. Required fields are marked *