20/08/14 14:59:12.49 uGqrrAzw.net
>>983
@echo off
set src=Plugins\update.txt
set ini=Soft.ini
for /f "usebackq tokens=1* delims=:" %%G in (`findstr /c:"Update time" "%src%"`) do set "VER_UT=%%H"
for /f "usebackq tokens=1* delims==" %%G in (`findstr /c:"LastUpdate" "%ini%"`) do set "VER_IT=%%H"
REM 比較するならここで処理
REM echo "%VER_UT%" "%VER_IT%"
ren "%ini%" "%ini%.bak" && copy nul "%ini%" || (echo ERROR &pause &exit /b)
for /f "usebackq tokens=1* delims==" %%G in ("%ini%.bak") do (
if "%%G"=="LastCheck " ( >>"%ini%" echo %%G=%VER_UT%
) else (
if "%%G"=="LastUpdate " ( >>"%ini%" echo %%G=%VER_UT%
) else ( >>"%ini%" echo %%G=%%H
)
)
)
REM 空行消したくなければ findstrで読んで行番号を表示させる