@echo on color 2f mode con: cols=80 lines=25 @REM @echo 正在清理SVN文件,請稍候...... @rem 循環(huán)刪除當前目錄及子目錄下所有的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