@echo on color 2f mode con: cols=80 lines=25 @REM @echo 正在清理SVN文件,请稍候...... @rem 循环删除当前目录及子目录下所有的SVN文件 @rem for /r . %%a in (.) do @if exist "%%a\.svn" @echo "%%a\.svn" @for /r . %%a in (.) do @if exist "%%a\.svn" rd /s /q "%%a\.svn" @echo 清理完毕!!! @pause
第二个:不如上面的简洁
复制代码 代码如下:
@echo off D: CD D:/wwwroot/tws/estore/estore :BEGIN CHOICE /C YN /M "Run svn update" IF ERRORLEVEL ==2 GOTO RUNANT IF ERRORLEVEL ==1 GOTO SVNUP GOTO BEGIN :SVNUP echo svn updating ... svn update echo svn update completed GOTO RUNANT :RUNANT CHOICE /C YN /M "Run Ant" IF ERRORLEVEL ==2 GOTO END IF ERRORLEVEL ==1 GOTO ONE GOTO END :ONE ECHO Run Ant ... ant GOTO END :END echo bye ... pause