Script de lot - ECHO

ÉCHO

Cette commande par lots affiche des messages ou active ou désactive l'écho des commandes.

Syntaxe

ECHO “string”

Exemple

L'exemple suivant montre les différentes variantes de la commande 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%

Production

La sortie suivante sera affichée dans l'invite de commande.

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