/ Published in: Windows Registry
URL: http://weblogs.asp.net/jgalloway/archive/2007/02/24/shell-command-remove-svn-folders.aspx
I changed the code on the web site slightly to get it to work with the registry editor.
Once this new shell command is in place, right click on the directory of interest, and select "Delete SVN Folders" to strip all the .svn folders from the directory.
Expand |
Embed | Plain Text
Create a new key: \HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN Text of the default REG_SZ string should be: Delete SVN Folders Create a new key: \HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN\command Text of the default REG_SZ string should be: cmd.exe /C "TITLE Removing SVN Folders in %1 && FOR /r "%1" %%f IN (.svn) DO RD /s /q "%%f" "
Comments
Subscribe to comments
You need to login to post a comment.

Paste the following text into a new reg file (.reg extension) and double-click or right-click->Merge to have it be automatically placed into the registry.
Windows Registry Editor Version 5.00
[HKEYLOCALMACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN] @="Delete SVN Folders"
[HKEYLOCALMACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN\command] @="cmd.exe /C \"TITLE Removing SVN Folders in %1 && FOR /r \"%1\" %%f IN (.svn) DO RD /s /q \"%%f\" \""
Sorry, last post did some unintended "Markdown," so here (hopefully) is the correct text to put in the reg file. Windows Registry Editor Version 5.00
Here's the TortoiseSVN way:
http://tortoisesvn.net/node/343
unversion a working copy
Sat, 2008-09-13 06:40 — Stefan
A lot of people asked on our mailing lists how they can "unversion a working copy", "detach/unlink a working copy from the repository", "remove files from version control" or something like that. All those questions lead to the users wanting to remove the hidden .svn folders inside every Subversion working copy.
Usually, you want a "clean copy" of your versioned files for zipping, archiving, ... The command in Subversion to do that is "Export". Exporting a working copy or a repository url will create a copy of all your files, but without those .svn folders. But the export command creates a copy, it does not remove the .svn folders from an existing working copy. Which is what most users want.
But some users really want to just make a working copy unversioned. Searching the web you can find a lot of users posting scripts which scan a path recursively and delete all those .svn folders. But if you have TortoiseSVN installed, that isn't needed:
TortoiseSVN has a little known feature built in which can do exactly that: it removes all .svn folders automatically. So where can you find that feature? Use the "Export" command! But hey, didn't I just tell you that the export command creates a copy of the files in your working copy and doesn't change your original working copy? So how can the export command remove the .svn folders from an existing working copy? Simple: when you right-click on a working copy and choose "Export..." from the context menu, a folder browse dialog is shown where you can choose the folder where you want the working copy exported to. If you now select the very same path that your working copy is on as the target (i.e., you're exporting the working copy onto itself), TortoiseSVN will remove all .svn folders of that working copy.
Another way to do this is by right-dragging the working copy onto itself. The Explorer doesn't allow dragging items onto themselves in the same window though, so you must either use a second Explorer window or drag onto the tree view as shown in the animation [on the blog].