Alex Gordon
Alex Gordon

Reputation: 60751

getting returned results after running .BAT file

when i run a .BAT file, it displays a message but immediately closes the window

how i can i force it to keep the window open so that i can see the message reeturned?

Upvotes: 2

Views: 1054

Answers (3)

Gui13
Gui13

Reputation: 13551

An alternative is to execute this bat file from an already opened command prompt (shortcut: Windows Key + R, type cmd, press ENTER)

Upvotes: 1

David X
David X

Reputation: 4166

You can also wrap it another batch file that calls the original and then pauses:

FOO.BAT
PAUSE

This also works for read-only batch files and compiled executables.

Upvotes: 1

Philip Kelley
Philip Kelley

Reputation: 40319

One way is to conclude the batch file with the

PAUSE

command.

Upvotes: 4

Related Questions