}
f.delete();
}
//拷贝整个文件夹的方法
public void copyFiles(String path1, String path2) throws Exception {
// TODO Auto-generated method stub
File file = new File(path1);
if(file.isDirectory())
{
File f = new File(path2);
if(!f.exists()) f.mkdir();
File[] files = file.listFiles();
for (File file2 : files) {
//System.out.println(file2.toString()+"-----"+path2+"/"+file2.getName());
copyFiles(file2.toString(),path2+"/"+file2.getName());
}
}else
{
copy(path1,path2);
}
}