- @echo off & setlocal enabledelayedexpansion
- copy /b *.txt a.Log
- for /f "tokens=1,2delims=-" %%i in (tmp\截取号码段.txt) do (
- set /a n+=1
- set _%%i_!n!=1&set _%%j.!n!=1
- )
-
- set n=1
- (for /f "delims=" %%i in ('sort a.Log') do (
- if defined _%%i_!n! set flag=1
- if defined flag echo;%%i
- if defined _%%i.!n! (set /a n+=1 & set flag=)
- ))>result.Log
- pause
复制代码
|