[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
  1. @echo off
  2. setlocal ENABLEDELAYEDEXPANSION
  3. echo ┌──────────────────────────────┐
  4. for /f "delims=" %%i in (a.txt) do set i=%%i&&call :aaa
  5. echo └──────────────────────────────┘
  6. pause>nul&&exit
  7. :aaa
  8. if not "%tp2%"=="" echo ├──────────────────────────────┤
  9. :bbb
  10. if not "!i:~0,%tp%!"=="%i%" set /a tp+=1&&goto bbb
  11. set /a spacenum=60-%tp%
  12. if %spacenum% lss 0 set spacenum=0
  13. set tp=
  14. set space=
  15. for /l %%t in (1 1 %spacenum%) do set space= !space!
  16. echo │%i%%space%│
  17. set tp2=aaa
  18. goto :eof
复制代码
哈哈,先下手为强!!(仅做到输进表格)

[ 本帖最后由 yslyxqysl 于 2008-10-5 15:39 编辑 ]
1

评分人数

TOP

  1. @echo off&&setlocal ENABLEDELAYEDEXPANSION
  2. for /f "delims=" %%e in (a.txt) do set e=%%e&&call :abc
  3. set /a tp=longest%%2
  4. if %tp%==1 set /a longest+=1
  5. set /a tp=%longest%/2
  6. for /l %%m in (1 1 %tp%) do set heng=─!heng!
  7. echo ┌%heng%┐
  8. for /f "delims=" %%i in (a.txt) do (
  9. set i=%%i
  10. if not "!tp2!"=="" echo ├%heng%┤
  11. set tp=
  12. call :aaa
  13. )
  14. echo └%heng%┘&&pause>nul&&exit
  15. :abc
  16. if not "%tp%"=="" (if not "!e:~0,%tp%!"=="%e%" set /a tp+=1&&goto abc) else ^
  17. set /a tp+=1&&goto abc
  18. if "%longest%"=="" (set longest=%tp%) else if longest gtr %tp% set longest=%tp%
  19. goto :eof
  20. :aaa
  21. if not "!i:~0,%tp%!"=="%i%" set /a tp+=1&&goto aaa
  22. set /a spacenum=%longest%-%tp%
  23. if %spacenum% lss 0 set spacenum=0
  24. set space=&&set tp=
  25. for /l %%t in (1 1 %spacenum%) do set space= !space!
  26. echo │%i%%space%│&&set tp2=aaa&&goto :eof
复制代码

超级复杂版

[ 本帖最后由 yslyxqysl 于 2008-10-5 17:54 编辑 ]
1

评分人数

TOP

返回列表