I have a case where I need to spawn multiple CMD
instances (using the START
program), and each instance needs to run some commands in sequence. These commands are generated by a batch script, so they are not known ahead of time.
Basically, what I'm looking to do is something like the following, but I don't know the proper syntax (or if it's even possible):
START (program_a && program_b && program_c)
Obviously, those parentheses are incorrect syntax. So when I try to run some syntactically correct variant(s):
START program_a && program_b && program_c
I just end up with one CMD
instance being spawned, running program_a
, and the "owning" batch script continues to execute program_b
and program_c
on its own (i.e. not in the CMD
instance spawned by START
).
Click Start, type cmd, and press Enter to open a command prompt window. In the Windows taskbar, right-click the command prompt window icon and select Command Prompt. A second command prompt window is opened.
Instead of scheduling multiple Windows Tasks that may overlap, use the "start /wait" command a batch file (. bat) to automatically run multiple commands in sequential order.
To make your command block run multiple commands, you will need to summon FallingSand or falling_block (depending on your version of Minecraft) with command blocks and redstone blocks for each command. The command blocks will be stacked one on top of the other and contain the individual command.
I think, you need something like:
start "MyWindow" cmd /c "ping localhost & ipconfig & pause"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With