ECHO – Windows CMD Command

Display messages on screen, turn command-echoing on or off.

Type ECHO without parameters to display the current echo setting (ON or OFF).

In most batch files you will want ECHO OFF, turning it ON can be useful when debugging a problematic batch script.

In a batch file, the @ symbol at the start of a line is the same as ECHO OFF applied to the current line only.

Normally a command is executed and takes effect from the next line onwards, @ is a rare example of a command that takes effect immediately.

Command characters will normally take precedence over the ECHO statement
e.g. The redirection and pipe characters: & < > | ON OFF

If the variable does not exist – ECHO will simply return the text “%_department%”

This can be extended to search and replace parts of a variable or display substrings of a variable.

Echo a file

Use the TYPE command.

Echo a sound

The following command in a batch file will trigger the default beep on most PC’s

Echo text into a stream

Streams allow one file to contain several separate forks of information (like the macintosh resource fork)

Only the following commands support the File:Stream syntax – ECHO, MORE, FOR

Creating streams:

Displaying streams:

A data stream file can be successfully copied and renamed despite the fact that most applications and commands will report a zero-length file. The file size can be calculated from the remaining free space. The file must always reside on an NTFS volume.

ECHO does not set or clear the Errorlevel.
ECHO is an internal command.

You may also like...

3 Responses

  1. froleprotrem says:

    Hello.This post was really interesting, particularly because I was searching for thoughts on this matter last week.

  2. zortilo nrel says:

    I was more than happy to search out this internet-site.I wished to thanks in your time for this glorious learn!! I definitely enjoying each little bit of it and I have you bookmarked to take a look at new stuff you weblog post.

  3. Gemma Bushovisky says:

    wonderful post

Leave a Reply

Your email address will not be published.