问题
i'm looking for best practice in a situation where i want to send two commands to a separate window. as in:
start /wait command1 && command2
this works however the second command is not executed in the new window instead runs in the initial window after the first task is finished.
how should a situation like this be handled correct?
回答1:
You cannot do it directly with start but cmd supports that using quotes:
start /wait cmd /c "command1 && command2"
You probably can use cmd directly:
cmd /c "command1 && command2"
来源:https://stackoverflow.com/questions/48458062/best-batch-practice-to-run-a-second-command-with