import java.io.*;
class FindFile {
public static void main(String[] args) {
File dir = new File("D:/Abhishek/src/com/siemens/med/hs/sf/payer/billing/claiminterface");
FilenameFilter filter = new FilenameFilter() {
public boolean accept
(File dir, String name) {
return name.indexOf("Claim");
}
};
String[] children = dir.list(filter);
if (children == null) {
System.out.println("Either dir does not exist or is not a directory");
}
else {
for (int i=0; i< children.length; i++) {
String filename = children[i];
System.out.println(filename);
}
}
}
}
问问题
155 次