Skip to content

Zip Directory

Creates a .zip archive from a source directory.

Required

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

Required

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

Required — Default: True

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

  • Category: File and directory
  • Brick ID: Directory-Zip
{
"category": "fileAndDirectory",
"description": "Creates a .zip archive from a source directory.",
"developerVendor": "CapaSystems A/S",
"displayName": null,
"id": "Directory-Zip",
"name": "Zip Directory",
"parameters": [
{
"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
},
{
"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
},
{
"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"
}