How to use batch processing to implement DOS Command Helper
This article mainly introduces how to use batch processing to achieve DOS command help program, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.
Txt named after the command
The code is as follows:
@ echo off
: z
@ cls
@ set / p "d = enter the instruction to BAT:"
@% d% /? >% d%.txt
Goto z
Goto z
All generate help documents for a.txt
The code is as follows:
@ echo off
Color 0e
: ks
Cls
Echo = =
Echo Welcome to the batch Helper
Echo = =
Echo.
Echo, please enter the batch command you want to query?
Echo (Q key exit; h key help)
Echo.
The set / p lc= ★ command ★:
If lc%==q goto e
If lc%==h help
Lc% /? > a.txt
If errorlevel 1 goto no
If errorlevel 0 goto yes
: yes
Start a.txt
Goto ks
: no
Echo = =
Echo can not find the batch command you want, please check and re-enter the command!
Echo = =
Del a.txt
Pause
Call 0
: e
Del a.txt
Exit
Thank you for reading this article carefully. I hope the article "how to use batch processing to achieve DOS command help program" shared by the editor will be helpful to everyone. At the same time, I also hope you can support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!