public static void removeFiles(String srcDir,String desDir){
  File srcFile=new File(srcDir);
  String[] list=srcFile.list();
  if (list != null) {
    int count=list.length;
    for (int i=0; i < count; i++) {
      String fileName=list[i];
      File file=new File(desDir,fileName);
      if (file.isFile()) {
        file.delete();
      }
 else {
        Debug.log("FileUtils.removeFiles() Unable to delete file");
      }
    }
  }
}

public static void removeFiles ( String srcDir , String desDir ) { File srcFile = new File ( srcDir ) ; String [ ] list = srcFile . list ( ) ; if ( list != null ) { int count = list . length ; for ( int i = 0 ; i < count ; i ++ ) { String fileName = list [ i ] ; File file = new File ( desDir , fileName ) ; if ( file . isFile ( ) ) { file . delete ( ) ; } else { Debug . log ( "FileUtils.removeFiles() Unable to delete file" ) ; } } } }
method removefiles . all the files existing in source directory will be removed from destination directory
