Found on the internet to create a "cmd command Quick Search Manual" batch processing _dos/bat

Source: Internet
Author: User
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
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.