!7 import java.nio.file.*; p { Path path = FileSystems.getDefault().getPath(userHome()); Files.walkFileTree(path, new SimpleFileVisitor() { @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { // here you have the files to process print(file); return FileVisitResult.CONTINUE; } }); }