DnZip 3.0.0
dotnet tool install --global DnZip --version 3.0.0
dotnet new tool-manifest
dotnet tool install --local DnZip --version 3.0.0
#tool dotnet:?package=DnZip&version=3.0.0
nuke :add-package DnZip --version 3.0.0
DnZip
DnZip is a .NET command-line tool for creating ZIP archives from one or more files and directories, with optional recursive directory inclusion and password-based encryption.
It is intended as a simple alternative to the default Windows ZIP workflow, especially when you need encrypted archives from the command line.
Package: DnZip on NuGet
DnZip is distributed as a .NET global/local tool package.
Features
- Create a ZIP archive from one or more files and directories
- Include subdirectories recursively
- Encrypt the archive with a password prompt
- Omit directory entries like
zip -D - Use Shift_JIS entry encoding for better compatibility with common Windows archive tools
Installation
You can install DnZip as a .NET tool:
dotnet tool install --global DnZip
You can also install it locally for a specific repository:
dotnet new tool-manifest
dotnet tool install DnZip
If you want to update an existing installation:
dotnet tool update --global DnZip
Usage
Syntax
dnzip [options] <archiveFilePath> <sourcePath> [sourcePath...]
Arguments
| Argument | Description |
|---|---|
archiveFilePath |
Output path of the ZIP archive to create |
sourcePath |
One or more files or directories to archive |
Options
| Option | Description |
|---|---|
-r, --recurse |
Include subdirectories recursively |
-e, --encrypt |
Prompt for a password and create an encrypted ZIP archive |
-D, --no-dir-entries |
Do not create directory entries |
Examples
Create a ZIP file from a directory:
dnzip output.zip ./data
Create a ZIP file including subdirectories:
dnzip output.zip ./data --recurse
Create an encrypted ZIP file:
dnzip output.zip ./data --encrypt
Create an encrypted ZIP file including subdirectories:
dnzip output.zip ./data --recurse --encrypt
Create a ZIP file from multiple inputs:
dnzip output.zip ./docs ./src/appsettings.json ./assets --recurse
Create a ZIP file without directory entries, like zip -D:
dnzip output.zip ./data --recurse --no-dir-entries
Behavior
- Returns exit code
0on success - Returns exit code
1on failure - Prints an error message if any source path does not exist
- Prompts twice for password confirmation when
--encryptis used
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.