title: How to create a .bat loop that creates a new cmd window and runs a different loop/function?
body: <p>I have the following code:</p>
  
  <pre><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
  </code></pre>
  
  <p>My objective was to open 3 cmd windows and run the echo spam loop in each one of them. Instead, it start opening infinite cmd windows without running loopstart. I'm kind of new to bat language so is there anyone who can help me?</p>