code: private List<List<File>> batchOutdatedFiles(List<File> outdatedFiles) {
  
          List<List<File>> batches = new LinkedList<List<File>>();
  
          int total = outdatedFiles.size();
  
          int myBatchSize = (batchSize <= 0) ? outdatedFiles.size() : batchSize;
  
          for (int start = 0; start < total; start += myBatchSize) {
              int end = Math.min(start + myBatchSize, total);
              batches.add(outdatedFiles.subList(start, end));
          }
  
          return batches;
      }
docs: This utility method will group the file into a set of equal sized batches
  (except for possibly the last batch).
  
  @param outdatedFiles
  
  @return list of batched files