@echo off for /f "delims=" %%. in (1.txt) do set "_=0"&set "..=%%."&call :{} for /l %%+ in (1,1,%_%) do call,echo.%%..%%+%% pause>nul&goto :eof :{} set "#=%..:~,1%"&call,set "..=%%..:~1%%"&set /a _+=1&call,set "..%_%=%%..%_%%%%#%"&if defined .. goto {}
@echo off&setlocal enabledelayedexpansion for /l %%a in (0,1,10) do ( for /f "delims=" %%i in (a.txt) do ( set ke=%%i set /p=!ke:~%%a,1!<nul ) echo. ) pause
Keen:
复制代码 代码如下:
@echo off&setlocal enabledelayedexpansion for /f "delims=" %%i in (a.txt) do ( set v=%%i set n=0 call :lp ) for /l %%i in (1 1 %n%) do ( set num=%%i call,echo %%_!num!%% ) pause&exit/b :lp set /a n+=1 set _%n%=!_%n%!%v:~0,1% set v=%v:~1% if not "%v%"=="" goto lp goto :eof