zulc22
zulc22

Reputation: 337

Batch Commands using "@"

What is the difference inbetween using @ instead of nothing before your commands?
The only difference I know so far is @echo off means "Don't Show Commands" and echo off means "Say off"

Upvotes: 1

Views: 167

Answers (2)

BaBa
BaBa

Reputation: 337

ECHO OFF 

will display "ECHO OFF" in command prompt and then turn echo off while

@ECHO OFF

will not show any message and turn echo off.

Upvotes: 1

SomethingDark
SomethingDark

Reputation: 14305

If you don't start the batch script with @echo off, then every line of the script will be echoed to the command prompt as it's run. This can be useful for logging or debugging.

If echo is on, you can put @ before a command to keep that command from being echoed when it's run.

Beyond that, @ doesn't do anything else.

Upvotes: 1

Related Questions