Online Demo: CMD Command Quick Search Manual
Copy Code code as follows:
@echo Off & setlocal enabledelayedexpansion
echo.========================================
Echo begins to create the cmd command Quick Search manual, please wait ...
Echo creates Web page file headers ...
>cmdhelp.htm Echo ^>>cmdhelp.htm echo ^<title^>cmd command speed check manual ^</title^>
>>cmdhelp.htm echo ^<meta http-equiv= "Content-type" content= "text/html^"; charset=gb2312 "^/^ >
>>cmdhelp.htm Echo ^>>cmdhelp.htm echo ^<a name= "Top" ^>
>>cmdhelp.htm echo ^<center^>^>>cmdhelp.htm Echo ^<table^>
echo Create help Directory ...
for/f "delims=:"%%f in (' help^|findstr/n "^assoc" ') do set head=%%f
set/a head-=1
If "%head%" = = "0" (set head=) Else set head=skip=%head%
for/f "%head% delims="%%i in (' Help ') does (
Set Str=%%i & Set name=!str:~0,9! & Set desc=!str:~9!
echo.! name! | Findstr/v "^[a-z]" >nul && Echo!desc! >>cmdhelp.htm
if errorlevel 1 echo ^</td^>^</tr^>^<tr^>^<td^>^<a href= "#!name!" ^>!name!^</a^>^</td^>^<td^>^ ^ ^!desc!>>cmdhelp.htm
)
>>cmdhelp.htm echo ^</td^>^</tr^>^</table^>^<br^>^<a href= "#top" ^> return to the top of the page ^</a ^>^<br^>
echo Create help body ...
cscript//H:CScript//b
for/f%%i in (' Help^|findstr ' ^[a-z] "') Do (
>>cmdhelp.htm echo ^<a name= "%%i" ^>^Echo is creating the%%i help body ...
if/i "%%i" = "SC" Echo Press the Y key to continue ...
Help%%i | Findstr "<.*>" >nul
If not errorlevel 1 (
for/f "delims="%%a in (' Help%%i ') do (
Set St=%%a & Set st=!st:^<=^<! & Set st=!st:^>=^>!
Echo!st!>> cmdhelp.htm
)
) Else help%%i>>cmdhelp.htm
>>cmdhelp.htm echo ^</pre^>^<a href= "#top" ^> return to the top of the page ^</a^>^<br^>^<br^>
)
echo "cmd command Quick Search Manual" created, any key open
echo.========================================
Pause>nul && Start cmdhelp.htm