import java.io.File;
public class FileDelUtil {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
File f=new File("f:/eclipse_v3.4_wxx");
delFiles(f);
}
public static void delFiles(File file){
File fs[]=file.listFiles();
if(fs==null){
return;
}
for(int i=0;i
if(fs[i].isDirectory()&&fs[i].getName().equals("temp")){
delDirectores(fs[i]);
System.out.println(fs[i].getName()+" "+fs[i].getAbsolutePath()+" "+fs[i].delete());
}else if(fs[i].isDirectory()&&!fs[i].getName().equals("temp")){
delFiles(fs[i]);
}
}
}
public static void delDirectores(File f){ File files[]=f.listFiles(); if(files==null){ return; } for(int i=0;i