I’ve recently switched to Git after numerous issues with SVN, which I might rant about at some other time…. Since the switch I’ve needed to clean up some SVN checkouts on my computer so that I could move them into a Git repo instead.  It’s really simple to do:

NOTE: Doing this will remove ALL the .svn folders/directories in the SVN checkout you select.

  1. Make a new bat file on your computer.  (Just make a text document and change the extension to .bat)
  2. Open your file in a text editor and paste in the following command:
    FOR /F "tokens=*" %%G IN ('DIR /B /AD /S *.svn*') DO RMDIR /S /Q "%%G"
  3. Save the file
  4. Copy the file to the root of the repository you want to clean
  5. Run the command and wait whilst it goes through and removes all the .svn directories

DOWNLOAD: You can download a copy of my batch file from here