本帖最后由 pcl_test 于 2015-5-8 16:58 编辑
回复 3# fcxk - @echo off & setlocal enabledelayedexpansion
- set t=0
- for /f "delims=" %%a in ('type "1.txt"') do (
- set len=0
- for /f "tokens=*" %%i in ("%%a") do set "$=%%~nxi#"
- for %%b in (128 64 32 16)do if !$:~%%b!. neq . set /a len+=%%b&set $=!$:~%%b!
- set $=!$!fedcba9876543210&set /a len+=0x!$:~16,1!
- if !len! geq !t! set t=!len!
- )
- set /a t+=3
- for /l %%c in (1 1 128) do set "e=!e! "
- set n=0
- for /f "delims=" %%d in ('type "1.txt"') do (
- for /f "tokens=*" %%j in ("%%d") do set "str=%%~nxj"
- if "!n!" equ "0" set "str=!str!%e%" &set "str=!str:~,%t%!"
- set /p=!str!
- set /a n+=1
- if "!n!" equ "2" echo;&set n=0
- )<nul
- pause>nul
复制代码
|