Delete all .svn metadata on a Windows system

This is just one of those solutions that you come across and you just want to save for later because you know you'll need it again at some point in the future.

So you have a project in Windows which was stored in an svn repository and still has all the .svn metadata in every folder within. You want to clean this up and get rid of all the meta, perhaps to version control in a different system, or upload to FTP or whatever.

Easiest way I've found is to copy-paste the code below in notepad, save it as delete_svn.reg, double-click the .reg file to add the code to your registry, then simply go to Windows Explorer, right-click your top-level folder, and select Delete SVN Folders from the context menu. You'll see a cmd prompt pop-up for about half a second and you're done! Now why is it that trying to do a search in Explorer, then trying to delete the files via the Explorer UI takes about 100 times longer...

Anyway, here's the code:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN]
@="Delete SVN Folders"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN\command]
@="cmd.exe /c \"TITLE Removing SVN Folders in %1 && COLOR 9A && FOR /r \"%1\" %%f IN (.svn _svn) DO RD /s /q \"%%f\" \""
Oh, and I didn't come up with this. I pinched it from here, so full credit goes to the original author.

Comments

Popular posts from this blog

Wkhtmltopdf font and sizing issues

Import Google Contacts to Nokia PC Suite

Can't delete last blank page from Word