title: Sequentially processing multiple files in Spring Batch
body: <p>I have the following use case: I need to process a big number of files. Each processing looks more or less like this:</p>
  
  <p>1) read file</p>
  
  <p>2) perform operation (a) on the content </p>
  
  <p>3) perform operation (b) on the content</p>
  
  <p>4) perform operation (c) on the content</p>
  
  <pre><code>    ... 
  </code></pre>
  
  <p>n) delete file</p>
  
  <p>Spring Batch seems like a good solution to this problem with one exception: I don't want to read all the files in step 1), pass all of them to step 2) etc. because it would use up a lot of memory. </p>
  
  <p><strong>EDIT</strong>: I commit my files to memory (not to the DB). This is why I'd prefer to process the files one by one or in batches. I mean: run all steps on a single file/batch (the file/batch gets removed in the last step, memory gets cleaned up), then proceed to the next file/batch and so on.</p>
  
  <p>Does Spring Batch have a mechanism supporting multiple execution of all steps over and over?
  Or should I just run the same job multiple times until I've run out of files?</p>
  
  <p>Thanks and best regards,
  Peter</p>