看好!
@echo off
find /v "版本库" info.txt >N1.qqq
find /v "节点种类" N1.qqq >N2.qqq
find /v "最后修改的作者" N2.qqq >N3.qqq
find /v "最后修改的版本" N3.qqq >N4.qqq
find /v "最后修改的时间" N4.qqq >N5.qqq
FOR /F "eol=; tokens=2,3* delims=, " %%i in (N5.qqq) do @echo set ver=%%i >N6.bat
call N6.bat
del /s /q /f *.qqq
del /s /q /f N6.bat
echo.%ver%
老大,其实我也想简单点,可我就是忘记了find 仅显示包含字符串的行的命令了,CMD中又找不到!你将就将就吧!
@echo off&setlocal
for /f "tokens=1,2 delims=:" %%i in (info.txt)do if "%%i"=="最后修改的版本" set ver=%%j
echo.ver=%ver% &pause