level 10
喏,就是说bb.txt中数值第一行是225
而bbb.txt中数值第一行是224
让批处理检测出两个数值不一样,就执行命令例如goto 1
如果一样,就执行例如goto 2
谢谢大家!
2015年12月05日 13点12分
1
level 14
是只有一行吗
如果是
set /p %bb%=<\bb.txt
set /p %bbb%=<\bb.txt
if "%bbb%" neq "%bb%" goto 1 else goto2
2015年12月05日 14点12分
2
level 14
如果有多行:
for /f skip=0 tokens=* delims=" %%i in (bbb.txt) do (
set bbb=%%i)
for /f skip=0 tokens=* delims=" %%i in (bb.txt) do (
set bb=%%i)
if "%bbb%" neq "%bb%" goto 1 else goto2
大概没写错
2015年12月05日 14点12分
3
level 14
set /p %bb%=<bb.txt
set /p %bbb%=<bbb.txt
if "%bbb%" neq "%bb%" goto 1 else goto2
2015年12月05日 14点12分
6
果然写错了,上次把exist写成find
2015年12月05日 14点12分
level 14
set /p _1=<"bb.txt"
set /p _2=<"bbb.txt"
if not "%_1%"=="%_2%" (
goto 1
) else goto 2
2015年12月06日 08点12分
8
正解
![[哈哈]](/static/emoticons/u54c8u54c8.png)
!
2015年12月07日 05点12分