document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. import java.util.zip.*
  2.  
  3. //for WebApps
  4. //response.setContentType("application/zip")
  5. //response.setHeader("Content-disposition", "attachment; filename=filename.zip")
  6. //zout  = new ZipOutputStream(response.outputStream)
  7.  
  8. fout = new File(\'filename.zip\').newOutputStream()
  9. zout  = new ZipOutputStream(fout)
  10.  
  11. (1..5).each {
  12.     dirNum ->
  13.     (1..5).each {
  14.         fileNum ->
  15.         zout.putNextEntry(new ZipEntry("dir${dirNum}/file${fileNum}.txt"))
  16.         zout.write("Text Content".bytes)
  17.     }
  18. }
  19.  
  20. zout.close()
  21. fout.close()
');