本帖最后由 apang 于 2014-9-28 20:43 编辑
我也来一下:- @echo off & setlocal enabledelayedexpansion
- pushd "0\"
- set n=1
- (for /f "tokens=1,2 delims=:" %%a in ('findstr "\<941\>" *.txt') do (
- if defined a (
- if /i "%%~na" NEQ "!a!" (
- echo,!a!:!n!&set n=1
- ) else set /a n+=1
- )
- set "a=%%~na"
- ))>..\统计.txt
- echo,!a!:!n!>>..\统计.txt
- pause
复制代码
|