batch file - How to create a .bat loop that creates a new cmd window and runs a different loop/function? -
i have following code:
set cont=3 :window start segredo.bat if %cont% equ 0 goto windowend set /a cont=cont-1 goto window :windowend :loopstart echo spam goto loopstart :loopend my objective open 3 cmd windows , run echo spam loop in each 1 of them. instead, start opening infinite cmd windows without running loopstart. i'm kind of new bat language there can me?
for /l %%a in (1 1 3) start "" cmd /q /c"for /l %%b in (0) echo spam" inside out
- an infinite loop needed
echo, numericfor /lloop used. "iterate 0 1 in steps of 0",for /l %%b in (0 0 1)abreviated. - as 3 separate instances required, command placed inside
cmdinstance - we use aditional numeric
for /lloop,starteach ofcmdinstances. prevent problems commands,startcommand handles first quoted argument window title, pair of empty quotes included.
Comments
Post a Comment