The file structure is like the following:
root
-- [anything]
-- access.log
-- [anything]
-- access.log
path: /root/*/access.log
Thank you.
DirectoryScanner scanner = new DirectoryScanner();
scanner.setIncludes(new String[]{"*/access.log"});
scanner.setBasedir(basePath);
scanner.scan();
String[] files = scanner.getIncludedFiles();
This is the simplest solution using org.apache.tools.ant.DirectoryScanner