日期:2014-05-17 浏览次数:21250 次
@echo off if exist ctmp.ini del ctmp.ini for /f "tokens=*" %%a in (config.ini) do ( if /I %%a==update=yes ( call 2.bat echo update=no>>ctmp.ini ) else ( echo %%a>>ctmp.ini ) ) del config.ini ren ctmp.ini config.ini
------解决方案--------------------
@echo off set TmpFile=tmp.ini set /p ini=<config.ini if "%ini%" equ "update=yes" ( call 1.bat >"%TmpFile%" echo update=no >>"%TmpFile%" echo cop=af move /y "%~dp0%TmpFile%" config.ini )