https://github.com/ggleblanc2/zip-directory
The code in this repository zips a directory.
https://github.com/ggleblanc2/zip-directory
java zip
Last synced: about 1 year ago
JSON representation
The code in this repository zips a directory.
- Host: GitHub
- URL: https://github.com/ggleblanc2/zip-directory
- Owner: ggleblanc2
- Created: 2025-01-26T19:11:43.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-26T19:30:54.000Z (over 1 year ago)
- Last Synced: 2025-01-26T20:20:40.144Z (over 1 year ago)
- Topics: java, zip
- Language: Java
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Zip Directory
I needed an easy way to zip a Windows directory. So, I created this simple process using a `ZipOutputStream`.
Here's the output from one of my test runs.
Creating zip file: D:\Eclipse\FS22_BalanceSheet\FS22_BalanceSheet.zip
Writing BalanceSheet.lua to zip file
Writing gui to zip file
Writing gui/guiProfiles.xml to zip file
Writing gui/InGameMenuBalanceSheet.lua to zip file
Writing gui/inGameMenuBalanceSheet.xml to zip file
Writing images to zip file
Writing images/BalanceSheet.png to zip file
Writing images/menuIcon.dds to zip file
Writing languages to zip file
Writing languages/l10n_en.xml to zip file
Writing modDesc.xml to zip file
The process writes the zip file in the input Windows directory. Zip files are automatically excluded from the zip process.
There is only one required argument.
- The file path to the directory.
The remaining arguments are extension exclusions. You can have as many extension exclusions as you want. All other directories and files are included. Here's an example execute command, taken from one of my Windows batch files.
java -jar D:\Eclipse\Eclipse-2024-workspace\com.ggl.zipdirectory\zipdirectory.jar D:\Eclipse\FS22_BalanceSheet bat
I also exclude `.bat` files. The process adds the dot prefix.