Posts Tagged ‘windows’

HOWTO: Remove All Subversion .svn Folders and Files Quickly

Wednesday, March 19th, 2008

Yes you can Export a clean build with TortoiseSVN so that you have a clean copy without the .svn tracking items, remove the directory and make a new one.

But, if you need to clean up an existing folder you can use some old skool bat/cmd in the root with this command on Windows

for /f "tokens=* delims=" %%i in ('dir /s /b /a:d *svn') do ( rd /s /q "%%i" )

[source]

Just put that in a .cmd file like cleansvn.cmd like the source suggests in the root of the subversion project you want to clean up. Works nicely. It essentially just uses the rd command to remove directories recursively that match ’svn’.

I will be featuring tutorials and utilities with subversion including some tools to quickly add and pull the newly imported trees into Subversion that can be cumbersome. I will also be doing some in an IronPython command scripting language that gives you the full power of the .net language runtime to use in your scripts.

Bringing scripts back to Windows through good uses is the goal. Scripts are not always good to build on but for quick common tasks they can be great ways to do tasks much quicker.

For *nix you can just do

find . -type d -name ‘.svn' -print0 | xargs -0 rm -rdf



baseplane - technology platforms is proudly powered by WordPress
Entries (RSS) and Comments (RSS).

© 2006-2008 Ryan Christensen - template by drawk }}



Unless othewise specified the content in this site is licensed under a Creative Commons License
Your Ad Here Your Ad Here Your Ad Here Your Ad Here