How to remove all “.svn” folders in Windows XP & Vista?
Today I started working on a project moneyvidya. The application is really big with lots of features and all. But when I tried to copy the source code into beanstalk repository I came to see the “.svn” folders are already created in the application. Delete “.svn” folders in the project is a tedious process since I am using Windows Vista for development. If my operating system was Linux simple “rm” command with a regular expression will do. So I googled it for some help. I got really interesting tip to delete this folders. I would like to share it with you
The best thing they suggest is creating a registry file (filename.reg) and execute [create a text file named svndelete.reg and insert the code snippet below there after double click on the file that will add registry entry] the code snippet below. Once reg file is executed you will get a menu item called “Delete SVN Folders” in the context menu. Just right click on click on the “Delete SVN Folders” will delete all “.svn” folders in the directories recursively.
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\” \”"
Hope you enjoyed the post. Thanks reading tip. If you are interested in recieving my post subscribe me.
Tweet This Post
Delicious
Digg This Post
Facebook
MySpace
Ping This Post
Reddit
Stumble This Post
If you enjoyed this post, make sure you subscribe to my RSS feed!


Sanil S is a technology consultant, social media consultant and an entrepreneur from gods own country, Kerala. He blog regularly about...
11 Responses
If you want to do the same on linux, I am not sure how to do it with ‘simple “rm” command with a regular expression’. But you can remove .svn using the find command.
Binny V A on May 15, 2009 | Reply
Nice, but it doesn’t work…
Indeed, an error msg is displayed saying that an association must be defined for this action when I right-click on a folder… :/
Toto on Aug 24, 2009 | Reply
Are you using Windows Vista ?
Sanil S on Aug 24, 2009 | Reply
yeah it doesnt work here either…i think it’s due to the ” used and the fact they’ve been converted to html char codes…as i can’t get it work properly…cmd window flashes up but doens’t remove the folders.
tom on Oct 7, 2009 | Reply
I changed the “” and it worked for me:
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\” \”"
Guilherme Duarte on Oct 19, 2009 | Reply
This one worked for me
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\” \”"
Ru on Dec 16, 2009 | Reply
I see the problem is quotations are being replaced when you post in here. Copy and paste the script on your file and then replace the “”" for “
Ru on Dec 16, 2009 | Reply
Try
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\” \”"
Ketan on Jul 3, 2010 | Reply
Worked great!
Thank you!
Lizozom on Aug 4, 2010 | Reply
I followed the link http://www.codelabs.pl/index.php/articles/39-tools/48-svn-installation-on-windows.
while configuring i did some unnecessary setups, so i removed the subversion from the AddRemoves.Then i tried to install same as the abouve url and i ran the command like sc create SvnServe binpath= “C:\Program Files\Subversion\bin\svnserve.exe –service –listen-port 3690 -r \”C:\SvnData\”" start= auto.
Then i got the message like below:
[SC} create service failed 1073
the specified service already exists.
any on could help me ,how to config the subversion
thanks
prashant on Aug 9, 2010 | Reply
[...] have old .svn folders still buried within them. Sadly, this happens a little too often for me, so I found (and modified) the following [...]
Recursively delete all .svn folders in Windows - ToxicComa on Jan 26, 2010
Leave a comment