Wednesday 30 January 2019

Groovy: Print all the file names in a directory recursively


Below statement prints all the file names recursively.

HelloWorld.groovy
String directoryPath = "C:\\Users\\Public"

new File(directoryPath).eachFileRecurse { println it }


Previous                                                 Next                                                 Home

No comments:

Post a Comment