日期:2014-05-19 浏览次数:20724 次
File file = new File("c:/"); String[] files = file.list(new FilenameFilter() { public boolean accept(File dir, String name) { return name.endsWith(".txt"); } }); for (int i = 0; i < files.length; i++) { //你的逻辑 }