batch-file Echo


echo can be used to control and produce output.


  • ECHO [ON | OFF]
  • ECHO message
  • ECHO(message
  • ECHO(


ON | OFFCan either be ON or OFF (case insensitive)
messageAny string (except ON or OFF when used without ()


  • echo. will also display an empty string. However, this is slower than echo( as echo. will search for a file named "echo". Only if this file does not exist will the command work, but this check makes it slower.
  • echo: will behave just like echo(, unless message looks like a file path, e.g. echo:foo\..\test.bat. In this case, the interpreter will see echo:foo as a folder name, strip echo:foo\..\ (because it appears just to enter the directory echo:foo then leave it again) then execute test.bat, which is not the desired behaviour.