title: Batch process all files in directory
body: <p>Right now i have a batch job I wrote that calls another file and passes in the variables that executable needs to run (password and filename). </p>
  
  <p>Ex:</p>
  
  <pre><code>&gt; cd f:\test\utils 
  &gt; admin import-xml -Dimport.file=f:\DB\file1.xml  -Dadmin.db.password=test123
  </code></pre>
  
  <p>I wrote a job that does this, but found out that there would be multiple files.</p>
  
  <p>The username and password never change but the filename differs for like 15 different xml files--with maybe more coming soon.</p>
  
  <p>The files will always be located in the same folder. Instead of ending up with like 15-20 jobs (one for each file), can I write something that will process each file located in this directory. And either wait till one is completed before the next or I can add a 3 min sleep before it starts the next file.</p>