Marketing digital. Making results.

How to easily delete Subversion Folders in Windows

You’ve probably ran into a situation where you needed to just remove Subversion SVN folders from your project, maybe do a new checkout or whatever. I’ve ran into the issue while trying to create a new working copy of a repository i have been working with after getting a :

<pre>Unsupported working copy format  svn: This client is too old to work with working copy 'C:\myproject'; please get a newer Subversion client</pre>  

This happened because i checked out the project with an older copy of Subclipse, and probably did an update with the latest version of Tortoise SVN i had installed. Googling around the remedy seems to be to check out a fresh copy of the project using the older client, removing the older SVN folders from the unsupported working copy and then overwriting the fresh working copy with the SVN folder free unsupported working copy, effectively preserving your edits, while being able to check them back in. To delete the SVN folder from the unsupported copy, create a registry file as such in a text editor, run it and click Yes to add it to your registry.

Windows Registry Editor Version 5.00  [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN]  @="Delete SVN Folders"  [HKEY_CLASSES_ROOT\Folder\shell\DeleteSVN\command]  @="cmd.exe /c \"TITLE Removing SVN Folders in %1 && COLOR 9A && FOR /r \"%1\" %%f IN (.svn) DO RD /s /q \"%%f\" \""  

Alternative in case the above script does not work for you:

Windows XP

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 \"@ECHO OFF && TITLE Removing SVN Folders in %1 &&  COLOR F0 && ECHO Searching for .svn folders recursively in %1 &&  FOR /r \"%1\" %%f IN (.svn) DO ( RD /s /q \"%%f\" && ECHO Deleting %%f... )\""  

Windows Vista/7

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) DO RD /s /q \”%%f\” \”"  

When done, in Windows XP you should be able to delete all SVN folders in a folder by right clicking on the folder and selecting “Delete SVN Folders”.

References:

http://www.toxiccoma.com/random/recursively-delete-all-svn-folders-in-windows

http://www.iamatechie.com/remove-all-svn-folders-in-windows-xp-vista/