Skip to content

Instantly share code, notes, and snippets.

@atifaziz
Created March 5, 2009 11:12
Show Gist options
  • Save atifaziz/74301 to your computer and use it in GitHub Desktop.
Save atifaziz/74301 to your computer and use it in GitHub Desktop.
Removes all .svn folders
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