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