If you found the contents in this blog useful, then please make a donation to keep this blog running. You can make donations via Skrill with email address

Monday, August 16, 2010

Deleting All .svn directories from a SVN Local Copy

I have been puzzled for sometime on how to recursively delete all .svn directories from a local copy of a particular SVN checkout. I was searching through the net and found a solution but sadly it didn't work so I had to make some minor modifications to make it work. Now all you have to have to do is copy and paste the following code in a notepad and save it as "delete_svn.reg" and double click it and allow it to create a registry. Then you can right click on the root directory of any SVN local copy checkout and select "Delete SVN Folders" from the context menu to delete .svn metadata directories.

Windows Registry Editor Version 5.00
@="Delete SVN Folders"
@="cmd.exe /c \"TITLE Removing SVN Folders in %1 && COLOR 9A && FOR /r \"%1\" %%f IN (.svn _svn) DO RD /s /q \"%%f\" \""


Ben Wolfe said...

You can also use the "disconnect" feature of subclipse or tortoise. It should do it as well.

s2_zat said...

Yes Ben I have been doing that but got sick of it since I had to do it multiple times.