Zip Directory
Creates a .zip archive from a source directory.
Parameters
Section titled “Parameters”Source Directory
Section titled “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
Section titled “Zip File Path”Required
Full path to the .zip file that should be created, for example C:\Temp\archive.zip.
Overwrite Existing Zip File
Section titled “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
Section titled “Details”- Category: File and directory
- Brick ID:
Directory-Zip
Raw JSON definition
Section titled “Raw JSON definition”{ "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"}