It's programming time!/Batch/Echo

From Create Your Own Story

Echo

The ECHO command repeats back messages or toggles the command prompt display. It's one of the most basic batch commands.

Let's see what echo can do for you:

  1. Create a new batch file like we did earlier and open it in your text editor.
  2. Add the following lines to the file:
@echo Using echo without any following text will give you a status message
@echo

@echo OFF
echo "echo OFF" can also be used to disable the command prompt display.
rem @echo OFF is a good line to start your batch files with.

echo Now we no longer need to use the @ symbol in front of each command.
echo

pause
  1. Save your file without any formatting (Plain text).
  2. Double click your .bat file to execute the commands.

Remember: Don't edit the batch file while it's running. You can get unexpected errors that way.

Personal tools