How to remove all “.svn” folders in Windows XP & Vista?

svnToday 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\” \”"

delete-svn

Hope you enjoyed the post. Thanks reading tip. If you are interested in recieving my post subscribe me.

Comments

  1. Binny V A says:

    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.

  2. Toto says:

    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… :/

  3. Sanil S says:

    Are you using Windows Vista ?

  4. tom says:

    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.

  5. Guilherme Duarte says:

    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\” \”"

  6. Ru says:

    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\” \”"

  7. Ru says:

    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 “

  8. Ketan says:

    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\” \”"

  9. Lizozom says:

    Worked great!
    Thank you! :D

  10. prashant says:

    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

  11. Javier says:

    Thank you so much!!

  12. Worked awesome!!
    Thank you!

  13. Andrew Shved says:

    wow! thx it’s helped me!

  14. mario says:

    whats about windows7?
    none of the above worked for me

  15. Thanks you very much. Awesome method, it’s working.

  16. marc says:

    does not work on win7. pls post a script isntead of snippet that are prone to cut + paste conversion issues. Be responsible or dont share.

  17. Sanil S says:

    Hi Marc,

    Thanks for pointing out that. I wrote the post for Windows XP/ Vista not for Win 7. I will write a post soon for Win 7.

  18. Marc (yes I'm also named Marc) says:

    Marc, don’t be an ass.

Trackbacks

  1. [...] have old .svn folders still buried within them. Sadly, this happens a little too often for me, so I found (and modified) the following [...]

Speak Your Mind

*

* Copy this password:

* Type or paste password here:

Get Adobe Flash playerPlugin by wpburn.com wordpress themes