说的不清楚,我肯定没明白你要做什么,请补充。批处理也放桌面
@echo off&setlocal enabledelayedexpansion
::假定共有三种:(不然类似写... ,太多就不如先做成文件了)
set s1=112233
set p1=000
set s2=445566
set p2=111
set s3=778899
set p3=222
(for /L %%a in (1,1,3)do (find "!s%%a!" "123.txt">nul&&echo.!p%%a!))>1.txt
start 1.txt