title: Windows Batch file to run executable with different input file
body: <p>I'm really new to batch scripting, so please be patient! 
  In windows xp I have an executable which has <code>input.in</code> and <code>output.out</code> files.
  I would like to create a batch which reads the input file, modifies one or more lines, runs the <code>.exe</code> and stores the output in a folder whose name is dependent on the change made to the input file.</p>
  
  <p>Say I have an input file with 4 lines like this:</p>
  
  <pre><code>32.0d0 ! first parameter
  54.0d5 ! second parameter
  1.5d-1 ! third parameter
  11.0d0 ! fourth parameter
  </code></pre>
  
  <p>and I want to change the second parameter in the range 0.0->1.0 with step 0.1:</p>
  
  <pre><code>@echo off
  setlocal EnableDelayedExpansion
  set ReplaceLine1=2
  set inpfile=input.in
  set tempfile=input.temp
  set increment=0.1
  if exist "%tempfile%" del "%TempFile%"
  for /L %%i in (1,1,11) do (
  set /A param_value=(%%i-1)*increment
  set /A Cnt2=0
  for /f %%a in (%inpfile%) do (
  set /A Cnt2+=1
  if !Cnt2! geq %ReplaceLine1% echo %param_value% &gt;&gt; "%tempfile%" else echo %%a &gt;&gt; "%tempfile%"
  )
  copy /y "%tempfile%" "%inpfile%"
  MD .\"param_value"
  executable.exe &lt; "%tempfile%" &gt;&gt; .\"param_value" 
  )
  </code></pre>
  
  <p>does the above have any chance to get me somwhere close to where I would linke to go? </p>