1

I have a quite extensive batch file for swapping project files around and includes a few menu's and clearscreen commands. I have included the command - @Echo off to avoid all commands being output. The batch file works fine except it outputs the statement "Echo is off" when I refresh the screen for a new menu. Is there any way to stop the "Echo is off" statement?

3
  • You can stop a output by using >nul
    – 09stephenb
    Commented Apr 25, 2014 at 9:53
  • rather you have echo %variable% somewhere and variable is not defined.
    – npocmaka
    Commented Apr 25, 2014 at 10:01
  • I am not actually attempting to stop a certain output. The batch file is not outputting commands and outputting everything I want except it is outputting one thing extra - the "Echo is off." line when the screen refreshes after a clear screen. How do I stop the "Echo is off" from being output?
    – AJF
    Commented Apr 30, 2014 at 9:27

2 Answers 2

2

Look for a line that has echo and either nothing after it or a variable that is empty.

This is good to echo a blank line

echo(

and similarly this will echo a blank line and not a "echo is off" error when the variable is empty.

echo(%variable%
1

The echo statement is question is attempting to echo a variable which is not set.

The easy way is to replace echo %var% with echo(%var%

Not the answer you're looking for? Browse other questions tagged or ask your own question.