复制代码
- @echo off
- (for /f "delims=" %%a in ('dir /b /a-d *.txt') do (
- for /f "tokens=1,2* delims=::" %%b in ('type "%%a" ^| findstr /n .*') do (
- if "%%b" equ "4" (
- set /p =%%c/<nul
- ) else if "%%c" equ "合计(元)" (
- echo %%d
- )
- )
- ))>"result.log"
欢迎光临 批处理之家 (http://www.bathome.net/) | Powered by Discuz! 7.2 |