Thursday, April 12, 2012

How to delete all svn folders in a folder

Sometimes when you copy some folders from SVN checkout directory to other place in Windows but you don't want to keep all svn folders contained by these folders and their subfolders it is very tedious to delete them manually.   There is is one easy way to use one command file to do so for you,   All you need to do is to create one command file under your root folder(The folder after copying from svn folders). For example you can name this file as: claensvn.cmd and put the below contents into this file:

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

After the file is created just run this command and it will delete all svn folders under this root folder for you.

No comments:

Post a Comment