you can really use this to delete any given folder that you need to delete recursively, but I needed this today, and google only gives me the answer for linux, and some strange solutions to do the same in windows.
here's a simple solution that works from the command line (the easy way, right?):
for /f "usebackq" %d in (`"dir *.svn /ad/b/s"`) do rd /s/q "%d"
more than anything I know I will need this in the future, so here it is for me, hoping that it can help someone else out there J
Tuesday, July 29, 2008
Subscribe to:
Post Comments (Atom)
9 comments:
Not sure of the context in which you are needing to delete .svn folders. But one thing you could do is svn export the project/directory you want to get rid of the .svn files from. This will give you a nice clean project/directory without .svn folders or files.
I have needed this many times, when you work with multiple branches and are creating copies here and there you need this quite often, (tortoise)svn is not exactly a tool that "just works", I've had many issues using it too
I had to do this today after tortoise svn latest build messed up the version of my working copy (the python fixup script couldn't handle it). This slightly more simple command worked for me:
for /R %%i in (.svn) do rd /s/q %%i
Should be:
for /R %%i in (.svn) do rd /s/q "%%i"
to handle directory names with spaces in. The for /F way doesn't seem to handle this at all.
I needed this today and your solution was very effective. Thank you !
Thank you very much!!!!
Very Useful command. Saved me tons of time. Thanks!
Cool tanx..
Hii nice reading your blog
Post a Comment