public static void filepath(){
String filepath = "c:\\test";
File file = new File(filepath);
if (file.isDirectory()) {
String[] filelist = file.list();
for (int i = 0; i < filelist.length; i++) {
File readfile = new File(filepath + "\\" + filelist[i]);
if (!readfile.isDirectory()) {
//String t_path = readfile.getAbsolutePath();
String str_e = (readfile.getName()).substring(0,readfile.getName().length());
String str_hz = str_e.substring(str_e.lastIndexOf("."), str_e.length());
//System.out.println("t_path: "+t_path);
//System.out.println("str_e: "+str_e);
//System.out.println(str_hz);
if (str_e.contains(".jar") && str_hz.equals(".jar") && str_e.toLowerCase().contains("n97")) {
System.out.println(str_e);
}
}
}
}else{
System.out.println("no filepath...");
}
}