title: Script to execute multiple python files for Windows
body: <p>I have a python script (script.py) that requires one file per input (input.txt) and one file per output (output.txt). Plus, the script requires additional data from model.pcl. I execute script through the console. For windows it looks like this:</p>
  
  <blockquote>
    <p>type input.txt | python script.py model.pcl output.txt</p>
  </blockquote>
  
  <p>I would like to apply this script to 10 thousand files and save the result in separate txt files.</p>
  
  <p>I know how to do it with python:</p>
  
  <pre><code>import subprocess
  for i in range(1, 10001):
      e = 'type input_%s.txt | python script.py model.pcl output/output_%s.txt' % (i,i)
      subprocess.call(e, shell=True)
  </code></pre>
  
  <p>But it is not an ideal solution because in this approach I cannot specify a folder for an input file (input/input_%s.txt). If I try to do it I get an error:</p>
  
  <pre><code>the syntax of the command is incorrect.
  </code></pre>
  
  <p>Are there other options for a Windows machine?</p>