Nato51
Nato51

Reputation: 175

Batch hiding text from screen

I have a bat file like this.

echo hello world

But I get a long line of text before it can any one help.

I have looked on google but I didn't find anything.

Upvotes: 1

Views: 55

Answers (3)

Dragion172
Dragion172

Reputation: 1

Do ---->

@ECHO OFF

C:

CD\

CLS

:MENU

CLS

Echo HELLO WORLD!

Upvotes: 0

Magoo
Magoo

Reputation: 80033

Now - if you were to tell us what the long line of text was, we wouldn't be left wondering what particular line of text of the billions of possibilities it was.

But in all probability, you need

@echo off
echo hello world

where the first command tells cmd to turn the echoing of each command off. The @ tells cmd not to echo that particular command.

You could achieve the same result with

@echo hello world

but it's a real pain mechanically entering @ before each command - hence the @echo off switch.

Upvotes: 3

09stephenb
09stephenb

Reputation: 9806

Try using @echo off at the beginning of your script.

Upvotes: 1

Related Questions