batman 当前离线
考官
荣誉版主
随风 当前离线
@echo off&setlocal enabledelayedexpansion cd.>c.txt set var=C:\批处理之家论坛下载_batman原创代码合集 set "var2=a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9" for /f "delims=" %%a in ('dir/b "%var%"') do ( set /a x=-1&set "k=" set "num=%%~na#" for %%i in (%var2%) do set num=!num:%%i=%%i ! for %%i in (!num!) do set /a x+=1 if "!num:~0,-2!"==" #" set /a x-=1 for /l %%i in (1 1 !x!) do set "k= !k!" set num=!num:~0,-1! set "num=!num: =! " set /a n+=1,n=n%%4 set /p=!num:~0,10!!k!<NUL>>c.txt if !n! equ 0 echo.>>c.txt ) start "" "c.txt"复制代码
TOP
pusofalse 当前离线
@echo off&setlocal enabledelayedexpansion for %%i in (test\*) do ( echo>tmp %%~ni for %%a in (tmp) do set/a var=23-%%~za set/p=%%~ni <nul for /l %%i in (1 1 !var!) do set/p= <nul set/a m+=1 if !m! equ 4 echo.&set m=0 ) del tmp echo.&pause复制代码
if "(" lss "Z" echo (小于Z。 复制代码
评分人数
wxcute (冰疼)当前离线
@echo off for /l %%i in (1 1 10) do echo %%i pause复制代码
@echo off&setlocal enabledelayedexpansion for /f %%a in ('dir /b test') do ( set "str=%%~na "&set /a n+=1,m=n%%4 set "a=!str!"&call :lp if !m! equ 0 echo. ) pause>nul&goto :eof :lp if "%a:~,1%" gtr "z" set /a v+=1 set "a=%a:~1%" if defined a goto lp set /a num=15-v set /p=!str:~,%num%!<nul&set "v=0" 复制代码
zqz0012005 (smile)当前离线
假装是个高手
@echo off cd.>t~.txt set /p str=请输入: :loop >>t~.txt echo.%str:~,1% if not "%str:~1%"=="" (set "str=%str:~1%"&goto loop) >>t~.txt echo. setlocal enabledelayedexpansion for /f "tokens=1,2 delims=:" %%a in ('findstr /o .* t~.txt') do ( set /a n+=1,m=n-1 set "_!n!=%%a" if !n! geq 2 ( call set /a "len=%%_!n!%%-%%_!m!%%" if !len! equ 4 (if defined chr echo !chr!) ) set chr=%%b ) del t~.txt echo.&pause复制代码
terse 当前离线
中将
@echo off&setlocal enabledelayedexpansion set z=0 for /f "delims=" %%i in ('dir /b /a-d') do ( set/a n+=1 set _!n!=%%~ni >tem.txt echo %%~ni call :lp tem.txt ) cd.>tem.txt for /l %%i in (1 1 %n%) do ( set/a m=%%i%%4,mn=z-!%%iz! for /l %%i in (1 1 !mn!) do set "k=!k! " set/p=!_%%i! !k!<nul >>tem.txt&set k= if !m! equ 0 >>tem.txt echo. ) start "" "tem.txt"&exit :lp set %n%z=%~z1 if !%n%z! gtr %z% set/a z=!%n%z!复制代码
@echo off&setlocal enabledelayedexpansion set /a s=4&cd.>c.txt set "code= 0123456789abcdefghijklmnopqrstuvwxyz" for /l %%i in (0 1 36) do set num.!code:~%%i,1!#=a for /f "delims=" %%a in ('dir/b/a-d "tmp"') do ( set k=&set /a n=0&set "str=%%~na" for /l %%a in (0 1 10) do ( if not ""=="!str:~%%a,1!" ( set "var=!str:~%%a,1!" if defined num.!var!# set /a n+=1 )) for /l %%i in (1 1 !n!) do set "k= !k!" set "str=!str! " set /a m=m%%4+1 (set /p=!str:~,10!!k!<nul&if !m! equ !s! echo.)>>c.txt ) start c.txt复制代码
keen 当前离线
@echo off&setlocal enabledelayedexpansion for /f %%i in ('dir /b') do ( set str=%%~ni&set /a n+=1&set "space=" for /f "skip=1 delims=:" %%j in ('^(echo !str!^&echo.^)^|findstr /o .*') do set b=%%j set /a c=21-!b! for /l %%k in (1 1 !c!) do set "space=!space! " set "str=!str!!space!"&set /p=!str!<nul set /a var=!n!%%4 if !var!==0 echo\ ) pause>nul复制代码
netbenton (秋风夜雨)当前离线
@echo off&setlocal enabledelayedexpansion if not "%1"=="##" goto :next for /f "delims=." %%i in ('dir /b') do (echo %%i) goto :eof :next set "spac= " set/a n=1,ap=0,bp=0 set str= for /f "tokens=1,2 delims=:" %%a in ('%0 ##^|findstr /o .*') do ( set/a ap=19-%%a+bp+2,bp=%%a if defined nul ( for %%c in (!ap!) do ( set str=!str!!ec!!spac:~0,%%c! ) set/a n=n%%4+1 if !n! equ 1 echo !str!&set str= ) else (set nul=y) set ec=%%b ) if defined str echo !str! pause复制代码
zhouyongjun 当前离线
上校
@echo off&setlocal enabledelayedexpansion for /f "tokens=1,2 delims=:" %%a in ('dir/b/a-d^|findstr/o ".*"') do ( set/a n+=1,mod=n%%4,num=20-%%a+b if !mod! equ 1 (<nul set/p=%%~nb) else ( for /l %%c in (1,1,!num!) do set/p= <nul <nul set/p=%%~nb ) set "c=%%~xb9876543210"&set c=!c:~9,1! set/a b=%%a+c if !mod! equ 0 echo/ ) echo/&pause>nul复制代码
tab 当前离线
少将
@dir/b /a-d|sed -e :a -e "s/^.\{1,10\}$/& /;ta"|sed "N;s/\n/\t/;N;s/\n/\t/;N;s/\n/\t/"|more>r.txt&start r.txt复制代码