Detailed illustration of echo command in batch processing

Time:2019-9-24

1. Echo

Display the current status of ECHO: ECHO ON or ECHO OFF

2. ECHO ON

Setting the ECHO status to ON will display the command line, which is similar to the previous C:> flag, as shown in the figure:

Detailed illustration of echo command in batch processing

3. ECHO OFF

If the ECHO status is set to OFF, the command line will not be displayed, that is, the previous C:> similar flag. Like other functions, users can enter commands or display command results, as shown in the figure:

Detailed illustration of echo command in batch processing

4. ECHO string

Display the input string on the CMD screen. As shown in the figure

Detailed illustration of echo command in batch processing

5. ECHO String & ECHO String…

Used to display multi-line data, if shown as follows:

Detailed illustration of echo command in batch processing

6. ECHO String > File Path and File Name

Write a string to a file. If there is already data in the file, it will be cleared automatically before it is written. As shown in the figure:

(1)

Detailed illustration of echo command in batch processing

(2)

Detailed illustration of echo command in batch processing

(3)

Detailed illustration of echo command in batch processing

7. ECHO String >> File Path and File Name

Write a string to a file, and append the string to the end of the file if there is already data in the file. As shown in the figure:

(1)

Detailed illustration of echo command in batch processing

(2)

Detailed illustration of echo command in batch processing

(3)

Detailed illustration of echo command in batch processings

8. (ECHO String & ECHO String… )> File path and file name

Write multi-line data to a file (note that parentheses cannot be removed, if they are removed, only the last one can be written, and the previous one will be output in the CMD window. If there is already data in the file, it will be automatically cleared and then written.

9. (ECHO String & ECHO String… ) path and file name

Write multi-line data to a file (note that parentheses cannot be removed, if they are removed, only the last one can be written, and the previous one will be output in the CMD window. If there is already data in the file, append the string to the end of the file.

10. (ECHO String) > File Path and File Name

Add a string to another line in the file. As shown in the figure:

(1)

Detailed illustration of echo command in batch processing

(2)

Detailed illustration of echo command in batch processing

(3)

Detailed illustration of echo command in batch processing