一- @echo off&setlocal enabledelayedexpansion
- for /f "delims=" %%a in (1.txt) do set /a num=!num!+%%a
- echo;!num!
- pause
复制代码 二- @echo off&setlocal enabledelayedexpansion
- for /f "delims=" %%a in (1.txt) do (
- echo;%%a
- echo;!num!
- set num=%%a
- )
- pause
复制代码 三- @echo off&setlocal enabledelayedexpansion
- for /f "delims=" %%a in (1.txt) do (
- findstr "%%a" 2.txt>nul 2>nul||echo;%%a>>2.txt
- )
- pause
复制代码 前面好像出过类型的 |