|
ECHO
Setting ECHO "on" will display the batch process to the
screen, setting it to "off" will hide the batch process.
Syntax
echo [{on|off}] [message]
Parameters
{ on | off } : Specifies whether to turn the command-echoing
feature on or off.
message : Specifies text you want to display on the
screen.
@ECHO OFF Commands are NOT displayed
@ECHO ON Commands are displayed
ECHO can also be used in batch file to send output to the
screen:
@ECHO OFF
ECHO.
ECHO Hi, this is a batch file
ECHO.
PAUSE
ECHO. sends a blank line.
To echo special characters, precede them with a caret:
ECHO ^<
ECHO ^>
Otherwise you will get an error.
The @ before ECHO OFF suppresses the display of the initial
ECHO OFF command. Without the @ at the beginning of a batch
file the results of the ECHO OFF command will be displayed.
The @ can be placed before any DOS command to suppress the
display.
You can use the if and echo commands on the same command
line. For example:
if exist *.rpt echo The report has arrived.
Batch File Commands
|