非常急,请大侠帮忙。
------解决方案--------------------
public class DeleteFileDemo {
public static void main(String[] args) {
try {
//你要删除的图片的目录
String path = "d:\\test\\ ";
File f = new File(path);
File[] pathFileName = f.listFiles();
for (int i=0;i <pathFileName.length; i++){
File fdel = pathFileName[i];
if(fdel.isDirectory()){
continue;
}
fdel.delete();
}
} catch (Exception e) {
e.printStackTrace();
}
}
}