public static void writeValidationSample(List<File> validationList,String outputFolder){
  File validation_sample=new File(outputFolder);
  if (validation_sample.exists()) {
    LOG.warn("The output folder exists and will be deleted.");
    LOG.warn("  --> " + validation_sample.getAbsolutePath());
    FileUtils.delete(validation_sample);
  }
  validation_sample.mkdirs();
  if (!validationList.isEmpty()) {
    for (    File file : validationList) {
      String fileName=file.getName();
      File newFile=new File(outputFolder + "\\" + fileName);
      IOUtils.copyFile(file,newFile);
    }
  }
 else {
    LOG.error("There are no files in the sampled list to be written.");
  }
}

public static void writeValidationSample ( List < File > validationList , String outputFolder ) { File validation_sample = new File ( outputFolder ) ; if ( validation_sample . exists ( ) ) { LOG . warn ( "The output folder exists and will be deleted." ) ; LOG . warn ( "  --> " + validation_sample . getAbsolutePath ( ) ) ; FileUtils . delete ( validation_sample ) ; } validation_sample . mkdirs ( ) ; if ( ! validationList . isEmpty ( ) ) { for ( File file : validationList ) { String fileName = file . getName ( ) ; File newFile = new File ( outputFolder + "\\" + fileName ) ; IOUtils . copyFile ( file , newFile ) ; } } else { LOG . error ( "There are no files in the sampled list to be written." ) ; } }
this method writes all sampled files to the specified folder .
