title: Passing inputs from a text file to python program using batch file
body: <p>My python program asks for several inputs in an order and determine what output is needed. It works fine when using under python shell.</p>
  
  <p>Now I'm trying to use windows batch file to create a testing program, which will read through text files and take contents from each text file as inputs for each test case.</p>
  
  <p>I'm kinda new to batch files, so I'm not sure how to give python inputs inside this batch file. I tried to pass arguments by doing:</p>
  
  <pre><code>python.exe S_bank.py input
  </code></pre>
  
  <p>but then it just pop up the command line window without any inputs.</p>
  
  <p>here is what I got so far(which doesn't work at all):</p>
  
  <pre><code>@echo off
  
  setlocal enabledelayedexpansion
  
  set line=0
  
  for /r %%A in (*.txt) do (
  
      echo running test %%A &gt;&gt; frontendlog.txt
      start "C:\Python27\python.exe" "Z:\personal\test\S_bank.py"
  
      for /F %%i in (%%A) do (
          "Z:\personal\test\S_bank.py" %%i &gt;&gt; frontendlog.txt
  
      )
  )
  </code></pre>