Created
March 5, 2009 11:12
-
-
Save atifaziz/74301 to your computer and use it in GitHub Desktop.
Removes all .svn folders
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM DESVN | |
REM | |
REM Removes all .svn folders under the current directory | |
REM or a specific directory so that it is no longer | |
REM treated as a working copy of an SVN repository. | |
REM | |
REM Written by Atif Aziz (http://www.raboof.com) | |
REM | |
REM Public Domain | |
REM | |
REM NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
@echo off | |
if "%1"=="" ( | |
pushd "%cd%" | |
) else ( | |
pushd "%1" | |
) | |
echo This command script will remove all .svn folders under: | |
echo %cd% | |
echo. | |
set /p ANSWER=Proceed (Y/N)? | |
if "%ANSWER%"=="y" goto clean | |
if "%ANSWER%"=="Y" goto clean | |
goto :exit | |
:clean | |
for /r /d %%i in (.svn) do ( | |
if exist "%%i" ( | |
echo Deleting %%i | |
rd "%%i" /s /q | |
) | |
) | |
:exit | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment