windows bat更改正式环境测试环境脚本
@echo OFF if exist d:\dev.txt (goto exist) else goto notexist :exist set /p var="更改为<正式环境>?(y/n)" if %VAR%==y GOTO PRO if %VAR%==n GOTO END :PRO ECHO "正在更改为产品环境 pro" RENAME d:\wwwrootbak wwwrootbak22 RENAME d:\webroot wwwrootbak RENAME d:\wwwrootbak22 webroot rd d:\dev.txt GOTO END :notexist set /p var="更改为<测试环境>?(y/n)" if %VAR%==y GOTO DEV if %VAR%==n GOTO END :DEV ECHO "正在更改为开发环境 dev" RENAME d:\webroot webroot11 RENAME d:\wwwrootbak webroot RENAME d:\webroot11 wwwrootbak mkdir dev.txt GOTO END :END PAUSE |