For some command operations lower than ECHO, we need to know. Here, we will explain how to use ECHO Based on the doscommand. Many applications related to echo off are involved. You can pay attention to them.
1. As a switch to control whether the batchcompute command displays the command line itself during execution
Format: ECHO [ON | OFF]
2. display the current ECHO setting status
Format: ECHO
3. Output prompt information
Format: ECHO content
4. Close the doscommand prompt
In the DOS prompt state, type echo off to close the display of the DOS prompt so that only the cursor is left ON the screen until echo on is typed.
5. Empty output line, which is equivalent to entering a carriage return
Format: ECHO.
It is worth noting that ". "There must be no space in the middle of the ECHO, otherwise ". "Will be output to the screen as a prompt. in addition ". "can be replaced by any symbol, such as,:;" [\] +.
ECHO. the output carriage return is switched to the input of the TIME command through the DOS pipeline, which is equivalent to a carriage return after the TIME command is executed. therefore, the system will automatically return to the DOS prompt status after the current time is displayed: C:> ECHO. | TIME
The ECHO command output is another example of an empty line application: Add ECHO. To the automatic batch processing file so that the prompt screen originally displayed at the bottom of the screen appears at the top of the screen.
6. answer questions in the command
Format: ECHO Reply | command file name
The preceding FORMAT can be used to simplify commands that require human-machine interaction, such as CHKDSKF; FORMAT Drive:; del *. *). It uses the DOS pipeline command to use the preset reply language output by the ECHO command as the input of the man-machine conversation command. the following example is equivalent to entering "Y" press Enter: C:> echo y | CHKDSK/F when the called command is in man-machine conversation.
C:> echo y | del :*.*
7. Use the DOS command to create a new file or add File Content
Format: ECHO file content> file name
ECHO file content> file name
For example, C:> ECHO @ echo off> AUTOEXEC. BAT creates an automatic batch file.
C:> echo c: \ CPAV \ BOOTSAFE> AUTOEXEC. BAT Append content to the automatic batch file
C: type autoexec. BAT: displays the automatic batch processing file
@ ECHO OFF
C: \ CPAV \ BOOTSAFE
8. Print content or control code to the printer
Format: ECHO printer control code> PRN
ECHO print content> PRN