Draft for Information Only
ContentMS DOS Command: ECHO
MS DOS Command: ECHOReference from Microsoft MS-DOS cmd help DescriptionDisplays or hides the text in batch programs when the program is running. Also indicates whether the command-echoing feature is on or off. When you run a batch program, MS-DOS typically displays (echoes) the batch program's commands on the screen. You can turn this feature on or off by using the ECHO command. SyntaxECHO [ON|OFF]
To use the echo command to display a message, use the following syntax: echo [message]
Parameters
Related CommandFor information about suspending the execution of a batch program, see the PAUSE command. RemarksUsing a message with the ECHO commandThe ECHO message command is useful when ECHO is off. To display a message that is several lines long without displaying other commands, you can include several ECHO message commands after the ECHO OFF command in your batch program. Hiding the command promptIf you use the ECHO OFF command on the command line, the command prompt does not appear on your screen. To redisplay the command prompt, type ECHO ON. Preventing MS-DOS from echoing a lineYou can insert an at sign (@) in front of a command in a batch program to prevent MS-DOS from echoing that line. Echoing a blank lineTo echo a blank line on the screen, you can type ECHO and then a period (ECHO.). There must be no intervening space. Displaying pipes and redirection charactersYou cannot display a pipe (|) or redirection character (< or >) by using the ECHO command. ExamplesThe following example shows a batch program that includes a three-line message preceded and followed by a blank line:
If you want to turn ECHO off and you do not want to echo the ECHO command itself, include an at sign (@) before the command, as follows: @echo off You can use the IF and ECHO commands on the same command line, as follows: if exist *.rpt echo The report has arrived. ©sideway ID: 110700172 Last Updated: 7/26/2011 Revision: 0 Latest Updated Links
![]() ![]() ![]() ![]() ![]() |
![]() Home 5 Business Management HBR 3 Information Recreation Hobbies 8 Culture Chinese 1097 English 339 Travel 18 Reference 79 Computer Hardware 254 Software Application 213 Digitization 37 Latex 52 Manim 205 KB 1 Numeric 19 Programming Web 289 Unicode 504 HTML 66 CSS 65 SVG 46 ASP.NET 270 OS 431 DeskTop 7 Python 72 Knowledge Mathematics Formulas 8 Set 1 Logic 1 Algebra 84 Number Theory 206 Trigonometry 31 Geometry 34 Calculus 67 Engineering Tables 8 Mechanical Rigid Bodies Statics 92 Dynamics 37 Fluid 5 Control Acoustics 19 Natural Sciences Matter 1 Electric 27 Biology 1 |
Copyright © 2000-2025 Sideway . All rights reserved Disclaimers last modified on 06 September 2019