cmd脚本----tree命令的htm版
http://bbs.et8.net/bbs/showthread.php?t=673085
2005.7.3更新
进入目录,一层层点,嫌烦
tree命令只给看看。。不给点。。。我就是要点
tree命令的htm版
htm,css都没搞过,现学的,高手奸笑了
根目录下运行,测试,保存为tree_htm.cmd运行
代码:
一直PF CCF上天神的编程风格
[ Last edited by electronixtar on 2006-6-21 at 21:29 ]
http://bbs.et8.net/bbs/showthread.php?t=673085
2005.7.3更新
进入目录,一层层点,嫌烦
tree命令只给看看。。不给点。。。我就是要点
tree命令的htm版
htm,css都没搞过,现学的,高手奸笑了
根目录下运行,测试,保存为tree_htm.cmd运行
代码:
@echo off
del tree.htm 2>nul
echo ===============tree命令的htm版===============
echo.
echo by hitme 2005.7.3 hitme@xiahaixiao.com
echo.
echo 可直接点击进入6层内目录,完美主义者请自行修改
echo =============================================
echo.
echo 请稍候.............
>end.htm echo ^<head^>
>>end.htm echo ^<meta http-equiv="Content-Type" content="text/html^; charset=gb2312" ^/^>
>>end.htm echo ^<style type="text/css"^>
>>end.htm echo ^<!--
>>end.htm echo a:active { text-decoration: none ; color: red ; font-size: 12pt }
>>end.htm echo a:visited { text-decoration: none ; color: green ; font-size: 12pt }
>>end.htm echo a:link { text-decoration: none ; font-size: 12pt }
>>end.htm echo --^>
>>end.htm echo ^</style^>
>>end.htm echo ^</head^>
>>end.htm echo ^<body^>
setlocal ENABLEDELAYEDEXPANSION
for /f "skip=2 delims=" %%i in ('tree') do (
set n=%%i
if "!n:~1,1!"==":" set n0=!n:~0,2!
if "!n:~1,1!"=="─" (set n1=!n:~2!
set n2=
set n3=
set n4=
set n5=
set n6=
set n7=)
if "!n:~4,1!"=="─" (set n2=!n:~5!
set n3=
set n4=
set n5=
set n6=
set n7=)
if "!n:~5,1!"=="─" (set n2=!n:~6!
set n3=
set n4=
set n5=
set n6=
set n7=)
if "!n:~7,1!"=="─" (set n3=!n:~8!
set n4=
set n5=
set n6=
set n7=)
if "!n:~8,1!"=="─" (set n3=!n:~9!
set n4=
set n5=
set n6=
set n7=)
if "!n:~9,1!"=="─" (set n3=!n:~10!
set n4=
set n5=
set n6=
set n7=)
if "!n:~10,1!"=="─" (set n4=!n:~11!
set n5=
set n6=
set n7=)
if "!n:~11,1!"=="─" (set n4=!n:~12!
set n5=
set n6=
set n7=)
if "!n:~12,1!"=="─" (set n4=!n:~13!
set n5=
set n6=
set n7=)
if "!n:~13,1!"=="─" (set n5=!n:~14!
set n6=
set n7=)
if "!n:~14,1!"=="─" (set n5=!n:~15!
set n6=
set n7=)
if "!n:~15,1!"=="─" (set n5=!n:~16!
set n6=
set n7=)
if "!n:~16,1!"=="─" (set n5=!n:~17!
set n6=
set n7=)
if "!n:~17,1!"=="─" (set n6=!n:~18!)
if "!n:~18,1!"=="─" (set n6=!n:~19!)
if "!n:~19,1!"=="─" (set n6=!n:~20!)
if "!n:~20,1!"=="─" (set n6=!n:~21!)
set n=!n: =^ !
>>end.htm echo ^<a href="!n0!\!n1!\!n2!\!n3!\!n4!\!n5!\!n6!" target="_blank"^>!n!^</a^>
>>end.htm echo ^</br^>
)
for /f "delims=" %%i in (end.htm) do (
set x=%%i
for /l %%a in (1,1,5) do (
set x=!x:\\=\!
)
echo !x!>>tree.htm
)
endlocal
del end.htm
start tree.htm
一直PF CCF上天神的编程风格
[ Last edited by electronixtar on 2006-6-21 at 21:29 ]
本帖最近评分记录
(共 1 条)
点击查看详情
| 评分人 | 分数 | 时间 |
|---|---|---|
| cooray | +2 | 2007-11-24 09:29 |
C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"

