- 7
- 0
- 约1.88万字
- 约 24页
- 2017-06-05 发布于河南
- 举报
dos批处理文件的DOS常用命令(国外英文资料)
dos批处理文件的DOS常用命令
DOS used to handle files with DOS
Echo, @, call, pause, and rem are the most commonly used commands for batch files, and we start with them. The echo indicates the character after this command
Echo off means that all commands that run after this statement do not display the command line itself
The @ is similar to the echo off, but it is in the front of the other command line, indicating that the command line itself is not displayed at runtime.
Call call another batch file (if direct call other batch file, after the file will not be able to follow the current file follow-up orders)
Pause to run this sentence, display Press any key to continue... Wait for the user to press any key to continue
Rem indicates that the character after this command is interpreted, not executed, but only for future use
Example: use the edit edit a. at file, enter the following content after inventory to c: a. the at, after executing the batch file can be realized: to write all files in the root directory into the a.t xt, start UCDOS, enter the WPS, and other functions.
The contents of the batch file are:
Echo off does not display the command line
Dir c: *. * a.t xt the c disk file list to a.t.xt
Call c: ucdosucdos. Bat calls ucdos
You can say hello
Pause, pause, wait for the button to continue
Rem USES WPS annotations to use WPS
CD ucdos enters the ucdos directory
WPS using WPS
You can also use parameters like C in the batch file, which only takes a parameter to represent %.
The % represents the parameter, which is the string that is added to the file name when the batch file is run. Variables can be represented from % 0 to % 9 and % 0 for the file name itself, and the string is represented in % 1 through % 9.
For example, C: the next batch file in the root directory is called f.b at, which is format % 1
If you execute C: f a: the actual execution is format a:
Also like C: the next batch file in the root directory is called t.b at, which is type % 1 type % 2
So run C: t,
原创力文档

文档评论(0)