honghong33 当前离线
上等兵
评分人数
CrLf 当前离线
论坛巡查
1>1/* : @echo off cscript -nologo -e:jscript %0 <a.txt >b.txt pause & exit /b */ var text = WSH.StdIn.ReadAll() n=100 text = text.replace(/☆、/g,function(){return (++n) .toString().substr(-2)}) WSH.Echo(text)复制代码
TOP
bailong360 (zhonghua)当前离线
上尉
@Echo Off >nul 3>New_1.txt SetLocal EnableDelayedExpansion For /F "Usebackq Delims=" %%i In ("1.txt") Do ( Set "Str=%%i" If "!Str:☆=!" Neq "%%i" ( Set /A N+=1 Set N2=00!N! For %%j In (!N2:~-2!) Do Echo !Str:☆=%%j! ) )复制代码