Venu
Venu

Reputation: 101

Suppress the 'press any key to continue' in batch script

I am writing a batch script. After a stage in the command window it says 'press any key to continue' and halts, and after something is pressed the script continues. How can I prevent this in the script?

Upvotes: 10

Views: 88941

Answers (3)

user1066231
user1066231

Reputation: 593

you can call other script like this from source, @echo | call otherScript.bat please find the detailed answer here Another thread with example

Upvotes: 4

Silly
Silly

Reputation: 237

Pause>nul Will make it not echo 'press any key to continue . . .'

Upvotes: 10

Álvaro González
Álvaro González

Reputation: 146630

That's the output of the PAUSE command:

http://ss64.com/nt/pause.html

The problem with PAUSE is that it's often necessary when you run a batch file from Windows explorer (or you cannot read the output) but it's annoying in the command prompt. I asked about it here and I was suggested a nifty trick:

Conditional PAUSE (not in command line)

Upvotes: 9

Related Questions