What I need to do if Search a folder say C:\\example
C:\\example
I then need to go through each file and check to see if it matches a few start characters so if fil
I know, this is an old question. But just for the sake of completeness, the lambda version.
File dir = new File(directory); File[] files = dir.listFiles((dir1, name) -> name.startsWith("temp") && name.endsWith(".txt"));