ECO
Este comando em lote exibe mensagens ou ativa ou desativa o eco de comandos.
Sintaxe
ECHO “string”
Exemplo
O exemplo a seguir mostra as diferentes variantes do comando dir.
Rem Turns the echo on so that each command will be shown as executed
echo on
echo "Hello World"
Rem Turns the echo off so that each command will not be shown when executed
@echo off
echo "Hello World"
Rem Displays the contents of the PATH variable
echo %PATH%
Resultado
A seguinte saída será exibida no prompt de comando.
C:\>Rem Turns the echo on so that each command will be shown as executed
C:\>echo on
C:\>echo "Hello World"
"Hello World"
C:\>Rem Turns the echo off so that each command will not be shown when executed
"Hello World"
C:\Users\ADMINI~1\AppData\Local\Temp