I want a batch script which opens up multiple command prompt on a single click and runs the same command over and over again . i have written a below code which only opens an single command prompt and stops there .is there a way to do the same.
for /l %%x in (1, 1, 5) do (
start cmd /c
cd / && dir /s
)
Try using the conditional execution & or the && between each command either with a copy and paste into the cmd.exe window or in a batch file. Additionally, you can use the double pipe || symbols instead to only run the next command if the previous command failed.
You can use batch scripts to run multiple commands and instructions on your machine simultaneously. Using a batch script, you will be able to execute all your commands one by one automatically.
Open multiple command prompts in Windows 10In the Windows taskbar, right-click the command prompt window icon and select Command Prompt. A second command prompt window is opened.
for /l %%x in (1, 1, 5) do (
start cmd /c "cd / && dir /s && pause"
)
It opens different command prompts ...
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