December 16, 2014 / Last updated : April 22, 2023 Drona Java List files matching a naming pattern in Java This tutorial shows how to recursively list files matching a naming pattern in Java. To be able to list the files, you should be able to walk the file tree. JDK 7 provides a FileVisitor interface to walk a file tree.