联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
if exist temp.vbs goto MakeHTML echo Set objFSO = CreateObject("Scripting.FileSystemObject") > temp.vbs echo Set objFile = objFSO.CreateTextFile("list.htm",,true) >> temp.vbs temp.vbs cmd /u /c "%0" del temp.vbs start list.htm goto :eof :MakeHTML echo ^<html^>^<head^>^<style type="text/css"^>^<!-- >> list.htm echo ul{list-style:none;}a{text-decoration:none;} >> list.htm echo a{background-color:#eff;padding:0 20px;} >> list.htm echo a.folder{background-color:#fcf;}--^> >> list.htm echo ^</style^>^<body^>^<ul^> >> list.htm for %%a in (*) do ( echo ^<li^>^<a href="file:///%%~fa"^>%%~nxa^</a^> >> list.htm ) for /d %%a in (*) do ( set folder="%%~fa" call :SubDir %%folder%% ) echo ^</ul^>^</body^>^</html^> >> list.htm goto :eof :SubDir for %%a in (%1) do ( echo ^<li^>^<a class="folder" href="file:///%%~a"^>%%~nxa^</a^>^<ul^> >> list.htm ) for %%a in (%1\*) do ( echo ^<li^>^<a href="file:///%%~a"^>%%~nxa^</a^> >> list.htm ) for /d %%a in (%1\*) do ( set folder="%%~fa" call :SubDir %%folder%% ) echo ^</ul^> >> list.htm