File dir = new File("C:/Folder"); File[] files = dir.listFiles(new FileFilter() { @Override public boolean accept(File file) { return file.isFile(); } });