Use of echo off in doscommand

Source: Internet
Author: User

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

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.