Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import groovy.io.FileType
- File fooDirectory = new File("/some-path-to-the-parent-directory")
- // Recurse only *.html file (for example)
- def reportNamePattern = ~/.*\.html/
- fooDirectory.eachFileMatch(FileType.FILES, reportNamePattern) { File myFile ->
- // Use myFile as you want
- println myFile.name
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement