Reputation: 744
I have made a batch file that call another one program.bat
, the first batch do its commands and then call the second one program.bat
like this,
@echo off
bla bla bla
....
...
...
call program.bat
But in this way, it will execute the second bat showing its output, however I want it to hide the program.bat
output and show instead the phrase please wait ...
and when program.bat
finish his job, I want the first bat to return to do its other commands
Upvotes: 0
Views: 728
Reputation: 32930
Use:
echo Please wait ...
call program.bat >nul 2>&1
the >nul
redirects standard output of program.bat
to nul
(to nothing), meaning it is not displayed. 2>&1
redirects other errors (yes, they are considered a different output) to the standard output, which is redirected to nul
.
Upvotes: 3