# Zip Directory

> Creates a .zip archive from a source directory.

Source: https://docs.capaone.com/capaone/application-manager/powerbricks/zip-directory/  
Product: CapaOne — a separate CapaSystems product; do not apply this page to any other.

Creates a .zip archive from a source directory.

## Parameters

#### Source Directory
*Required*

Full path to the directory that should be compressed. Remember to include the [Download Content] PowerBrick when using $PackageRoot.

#### Zip File Path
*Required*

Full path to the .zip file that should be created, for example C:\Temp\archive.zip.

#### Overwrite Existing Zip File
*Required* — Default: `True`

Enable to replace an existing zip file at the destination path. Disable to keep the existing file unchanged.

## Details

- **Category:** File and directory
- **Brick ID:** `Directory-Zip`

## Raw JSON definition

**JSON**

```json
{
  "category": "fileAndDirectory",
  "description": "Creates a .zip archive from a source directory.",
  "developerVendor": "CapaSystems A/S",
  "displayName": null,
  "id": "Directory-Zip",
  "name": "Zip Directory",
  "parameters": [
    {
      "allowManualInput": null,
      "defaultValue": "",
      "defaultValueObject": null,
      "description": "Full path to the directory that should be compressed. Remember to include the [Download Content] PowerBrick when using $PackageRoot.",
      "id": "SourceDirectory",
      "name": "Source Directory",
      "regExValidation": "",
      "required": true,
      "type": "TextBox",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": null,
      "defaultValue": "",
      "defaultValueObject": null,
      "description": "Full path to the .zip file that should be created, for example C:\\Temp\\archive.zip.",
      "id": "ZipFilePath",
      "name": "Zip File Path",
      "regExValidation": "",
      "required": true,
      "type": "TextBox",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": null,
      "defaultValue": "True",
      "defaultValueObject": null,
      "description": "Enable to replace an existing zip file at the destination path. Disable to keep the existing file unchanged.",
      "id": "OverwriteFileIfExist",
      "name": "Overwrite Existing Zip File",
      "regExValidation": "",
      "required": true,
      "type": "Boolean",
      "value": null,
      "values": [],
      "valuesObject": null
    }
  ],
  "powershell": {
    "base64Encoded": true,
    "function": "ZnVuY3Rpb2..."
  },
  "type": "powerbrick",
  "version": "2026.7.2.1"
}
```
