- @echo &setlocal enabledelayedexpansion
- set /p aa=和值
- set /p ab=要读取的文本名
- echo %date%%time%
-
- setlocal enabledelayedexpansion
- echo %date%%time%
-
- for /f "tokens=1-6 delims= " %%i in (!ab!.txt) do (
- set /a s+=1
- set /a m+=%%i
- if /i !m! geq %aa% echo !s! %%i% !m! >>1h.txt
-
- )
- for /f "delims=" %%1 in (1h.txt) do (
- echo %%1 >>1hh.txt
- start 1hh.txt
- del 1h.txt
- goto a
- )
- :a
- ::pause&call 逐行相加4.bat&exit
复制代码 为什么第二次三次运行的时候 不能正确 运算
ab.txt
1
2
5
9
8
6
7
9
5 |