I want to execute one command after the commands above were all done.
In fact, the kkkk.exe is simply delay 5s and rrrr.exe is delay 9s. I have tried the following codes and it works, but I dont know why.
::run.bat
echo start test
(
start kkkk.exe
start rrrr.exe
)|pause
echo ppp
pause
What I know is:
|: redirects the output of the first command to the input of the second commandIt seems that
|will make sure the commands before|are done, so that it have output forpause. But simply run this code, the pause echo will show;press any keys to continue...directly without waiting 9s(rrrr.exe). Why?
After 9s, I don't need to actually input any key, the
echo pppwill automatically be run, why?If I change
|to&, I do need to input one key so that theecho pppwill be run, why?