Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. import groovy.io.FileType
  2.  
  3. File fooDirectory = new File("/some-path-to-the-parent-directory")
  4.  
  5. // Recurse only *.html file (for example)
  6. def reportNamePattern = ~/.*\.html/
  7. fooDirectory.eachFileMatch(FileType.FILES, reportNamePattern) { File myFile ->
  8. // Use myFile as you want
  9. println myFile.name
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement