Search This Blog

Tuesday, February 15, 2011

Delete all ".svn" folders from a directory

If you're working with SVN repositories and you suddenly want to send a project to a friend from "the outside of SVN" by email you don't want to share all your ".svn" data. Normally you'd struggle with deleting every ".svn" directory in all subdirectories - this can be really frustrating. 

There's however a neat solution to the problem:


You can "upgrade" your windows with "delete all '.svn'" with a single click by importing this reg file.


I don't like reg files too - you don't know what they do. But don't worry. All there's inside is this:

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

Which basically means:
- create "Delete SVN Folders" position in the right-click menu
- delete ".svn" files in the directory you right-clicked

No comments:

Post a Comment

If you like this post, please leave a comment :)