Have you tried Zeroturnaround Zip library? It’s really neat! Zip a folder is just a one liner:
ZipUtil.pack(new File("D:\\reports\\january\\"), new File("D:\\reports\\january.zip"));
(thanks to Oleg Ĺ elajev for the example)
More Related Contents:
- java.util.zip – Recreating directory structure
- directories in a zip file when using java.util.zip.ZipOutputStream
- How to read all files in a folder from Java?
- How to create a temporary directory/folder in Java?
- Appending files to a zip file with Java
- How to create a directory in Java?
- Getting the filenames of all files in a folder [duplicate]
- How to create a zip file in Java
- Read Content from Files which are inside Zip file
- How can I access a folder inside of a resource folder from inside my jar File?
- java.util.zip.ZipException: error in opening zip file
- How to create a folder in Java?
- How to compress a String in Java?
- Create whole path automatically when writing to a new file
- In Java: How to zip file from byte[] array?
- How to scan a folder in Java?
- How to read file from ZIP using InputStream?
- Creating zip archive in Java
- Using Unicode characters for file names inside a zip archive
- Find files in a folder using Java
- Java – Search for files in a directory
- list all files from directories and subdirectories in Java
- Directory listener in Java
- Difference between mkdir() and mkdirs() in java for java.io.File [closed]
- deleting folder from java [duplicate]
- Java Package Vs Folder-Structure? what is the difference
- How can I add entries to an existing zip file in Java? [duplicate]
- Difference between Package and Directory in Java
- Modifying a text file in a ZIP archive in Java
- List .zip directories without extracting