title: Batch Script - Call a subroutine for each token
body: <p>I am trying to pass a token to a subroutine in batch script-</p>
  
  <pre><code>SET devices=host1 host2 host3
  FOR /F "tokens=* delims=," %%G IN (%devices%) DO CALL :sendReq %%G
  
  :sendReq
  
  curl.exe http://%1:1234/service/monitor
  
  GOTO :EOF
  </code></pre>
  
  <p>Problems -
  <code>The system cannot find the file host1</code> - is the error message not sure why.</p>
  
  <p><code>%1</code> is not resolving to <code>host1</code>?</p>