Return to Snippet

Revision: 5310
at February 27, 2008 12:06 by karelklic


Initial Code
new File(args[0]).eachFileRecurse() { f ->
    if (f ==~ /.*zip$/ || !f.isFile()) return
    f.delete()
    println f.toString() + " removed"
}

Initial URL

                                

Initial Description
Very basic but I use various variations all the time.

Initial Title
Delete non-zip files in a directory recursively

Initial Tags
file

Initial Language
Groovy