1

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"

zulc22
  • 337
  • 2
  • 7
  • 17
  • See http://stackoverflow.com/questions/21074863/what-is-the-at-sign-in-a-batch-file-and-what-does-it-do – Doug Nov 11 '14 at 04:37

2 Answers2

1

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.

SomethingDark
  • 13,229
  • 5
  • 50
  • 55
  • :P Some people use `@` in batch scripts when they don't do anything. – zulc22 Nov 11 '14 at 04:41
  • @user3892628: In the command-line, try: `for %a in (one two three) do @echo %a` and compare the output vs. the same without the `@` – Aacini Nov 11 '14 at 16:22
1
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.

BaBa
  • 337
  • 2
  • 10