title: Spring Batch: Can i write to multiple files based on Size
body: <p>We are working on a Spring Batch Job, where we need to write to multiple files based on the size. For Example, we need to write to the output file output1.txt, once we reach 5 mb of the file size then it has to write into output2.txt.
  Please suggest</p>
  
  <p>Is there any OOTB feature in Spring batch where we can achieve it or do we need to write custom code to achieve this</p>