日期:2014-05-20 浏览次数:20675 次
public class moveFile {
private static String oldPath = null;
public static void main(String[] args) {
oldPath = "D:\\迅雷下载";
findFile(oldPath);
}
public static void findFile(String path) {
File f = new File(path);
File[] fileNames = f.listFiles();
for (File child : fileNames) {
if (child.getName().matches("^jia"))
System.out.println(child.getName());
}
}
}