try (Stream<Path> walk = Files.walk(Paths.get("C:projects"))) {
List<String> result = walk.map(x -> x.toString())
.filter(f -> f.endsWith(".html")).collect(Collectors.toList());
Bu şekilde bir kod c projects dizini altındaki html uzantılı tüm dosyaları bulacaktır.
Telefondan yazdığım için kodun formatı çok iyi olmadı kusura bakmayın.