- @echo off&setlocal enabledelayedexpansion
- for /f %%i in (a.txt) do set/an+=1&set s!n!=%%i
- for /f %%i in (b.txt) do set/ai+=1&set t=%%i&(for /l %%a in (1,1,!n!) do set s=&(for /l %%j in (0,1,100) do if "!t:~%%j,1!"=="*" (set s=!s!!s%%a:~%%j,1!)else set s=!s!!t:~%%j,1!)&echo !s!)>>b!i!.txt
复制代码 突然想起来*是不能直接替换的.. |