title: Python run Java command line arguments with incrementing variables asynchronously.
body: <p>I have a java program which does individual jobs e.g. takes in a file, does some processing on it and creates a new file. To run it I have to type the following in the command line.</p>
  
  <pre><code>java myprogram.jar -input myfile1.txt -output output/myfile1.txt
  </code></pre>
  
  <p>However i wish to batch process a few thousand files, so i would like to increment the number at the end of the myfile part of the string. So once the first job is finished, the second job will then start, and so on so forth. Rather than have thousands of instances of the java program running at the same time.</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Jon</p>