title: Using a For to list all files and use them as variables
body: <p>Right now my script works with this file setting the path to the txt files I need to execute.</p>
  
  <p>Is there a way to improve the script so it reads all the files in the servers folder and uses them instead of %s1%,%s2%, etc on the second FOR?</p>
  
  <p>The script</p>
  
  <pre><code>for /F "tokens=*" %%c in (servers\list.txt) do (
      %%c
  )
  for %%a in (%s1% %s2% %s3%) do (
      call :start %%a
  )
  </code></pre>
  
  <p>File list:</p>
  
  <pre><code>set s1=servers\xxx.txt
  set s2=servers\yyy.txt
  set s3=servers\zzz.txt
  </code></pre>
  
  <p>Servers folder contains the list.txt and files xxx.txt, yyy.txt, zzz.txt, etc.</p>
  
  <p>xxx.txt, yyy.txt files have the next format:</p>
  
  <pre><code>set server=192.168.0.0
  set user=user
  ...
  </code></pre>