猜- @echo off&setlocal enabledelayedexpansion
- for /f "tokens=1,2 delims=-" %%a in ('type "截取号码段.txt"') do (
- set "a=%%a"&set "b=%%b"
- set "name=!a:~,4!"
- if not defined #!name! set "#!name!=1"
- for /l %%c in (1!a:~4^,7! 1 1!b:~4^,7!) do set "_!name!%%c=1"
- )
- for /f "tokens=1 delims=#=" %%a in ('set #') do (
- for /f "delims=" %%i in ('type "%%a.txt"') do (
- set "c=%%i"
- for %%k in (!c:~4^,7!) do if defined _%%a1%%k echo;%%i
- )
- )
- pause
复制代码
|