DnZip 3.0.0

dotnet tool install --global DnZip --version 3.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local DnZip --version 3.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
#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 0 on success
  • Returns exit code 1 on failure
  • Prints an error message if any source path does not exist
  • Prompts twice for password confirmation when --encrypt is used
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
3.0.0 97 3/16/2026
2.1.0 80 2/3/2026
2.0.0 73 2/3/2026
1.0.1 789 6/3/2020
1.0.0 692 6/3/2020
0.1.2 683 6/3/2020
0.1.1 693 6/2/2020
0.1.0 738 5/30/2020