My source uses subversion and has a .svn directory in each subdirectory, how do I remove those .svn directories in Windows?

My source uses subversion and has a .svn directory in each subdirectory, how do I remove those .svn directories?

Method 1 – Exporting with TortoiseSVN
Well, if you are in windows with Tortoise SVN installed, you can right-click on the folder or inside the folder in white space and choose TortoiseSVN | Export. This allows you to select a folder and export your code without the .svn folders.

Method 2 – Scripted deletion
However, if you don’t have a Tortoise SVN Client but you have all those .svn folders, you can easily delete them by a simple one line command from the windows command prompt:

c:\path\to\source> for /F “tokens=*” %A in (‘dir /S /B /AD *.svn’) DO rmdir /S /Q “%A”

Leave a Reply

How to post code in comments?