![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-09-21 16:53 |
47,812 topics / 349,917 posts / today 0 new / 48,270 members |
| DOS批处理 & 脚本技术(批处理室) » Repost: Batch Files and Commands |
| Printable Version 3,052 / 4 |
| Floor1 MYS | Posted 2002-10-25 00:00 |
| 元老会员 Posts 1,637 Credits 5,170 From 广东佛山 | |
|
Batch Files and Commands
In the DOS operating system, you can often see some files with the extension BAT. What kind of files are these? What do they do? How are they made up? This is what is covered in this section. Batch Files A batch file is a text file with the extension “BAT” in which a series of commonly used commands are written as if writing a program. Such a file is called a batch file. To run this batch file, just enter the filename of this batch file and press Enter, and the batch file will run all or part of the specified commands according to the commands in the file. Using batch files can simplify work and bring many conveniences. Batch files can be created with software that has text editing functions, such as EDIT, WPS, CCED, etc.; even the COPY CON command can be used. A batch file can contain the following commands and statements: DOS internal and external commands, command files with extensions COM, EXE, BAT, and batch commands. A file named AUTOEXEC。BAT is called an automatically executed batch file, and is a special batch file. When the computer starts, it will be searched for and automatically executed. Batch commands (batch commands for short) 1. ECHO command Function: Allows or forbids the screen to display the commands executed in the batch file. Format: ECHO Parameter explanation: ON allows the following commands to be displayed on the screen when executed. OFF causes the following commands not to be displayed on the screen when executed. @ECHO.. means even this ECHO command itself is not displayed. ECHO+ means display one blank line. MESSAGE is information specified by the user; regardless of whether ECHO is currently ON or OFF, this information will be displayed on the screen when executed. 2. REM command Function: Add comments in a batch file. Format: REM Parameter explanation: string The content of the comment, up to 123 characters. 3. CALL command Function: Call and execute another batch file from one batch file; after execution is complete, return to the first batch file and continue execution. Format: CALLfilename Parameter explanation: d:The drive where the called batch file is located. Path The path where the called batch file is located. Filename The name of the batch file being called. |
|
| Floor2 慕白 | Posted 2003-06-21 00:00 |
| 高级用户 Posts 115 Credits 617 | |
|
Bump it up!!!
Are there any other commands???? |
|
| Floor3 shen2k3 | Posted 2003-08-22 00:00 |
| 初级用户 Posts 8 Credits 128 | |
|
I want to know more, thanks!
|
|
| Floor4 YP7351 | Posted 2003-08-22 00:00 |
| 初级用户 Posts 23 Credits 188 | |
|
Question about a batch command
EXTRACT /E /L %RAMDRIVE%\SYSTEM DOSET.CAB>NUL What do the /E /L parameters mean? What does >NUL mean? Thanks! |
|
| Floor5 duxuelj520 | Posted 2004-08-03 00:00 |
| 初级用户 Posts 55 Credits 217 | |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |