0

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?

secondplace
  • 400
  • 2
  • 5
  • 19
  • `start /wait command1 && command2` is parsed as `(start /wait command1) && command2` so the command2 is still run in the old cmd – phuclv Jan 26 '18 at 09:01

1 Answers1

2

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"
Adriano Repetti
  • 62,720
  • 18
  • 132
  • 197