Using ECHO

ECHO is used in batch files to control whether the commands and responses in the batch file are displayed (ECHO ON) or not displayed (ECHO OFF).

Use ECHO with no options to see the current setting for ECHO.

The following batch file demonstrates typical uses for ECHO:

@ECHO OFF
ECHO The following command displays the contents of the current folder
DIR/W
ECHO The preceding is the listing of the contents of the current folder

Windows NT/2000/XP permit you to scroll a command-prompt screen forward and backward to see all the contents of the current session. However, Windows 9x/Me do not; a long file can scroll off the screen. Use the ...

Get Absolute Beginner's Guide to A+ Certification now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.