public static void main( String[] args ) throws IOException {
String path = "D:\\testob";
String backupDataPath = "D:\\newObbo111";
File file = new File(path);
File file1 = new File(backupDataPath);
org.apache.commons.io.FileUtils.copyDirectory(file,file1); //备份文件
System.out.println( "Hello World!");
}
阿帕奇官方自带的方法