# Copy Directory

> Copy a directory from source to destination. This PowerBrick can be used to copy files during a package installation or for general file management tasks.

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

Copy a directory from source to destination. This PowerBrick can be used to copy files during a package installation or for general file management tasks.

## Parameters

#### Source Directory
*Required*

The full path to the source directory. Example: C:\Temp\MyFolder or $PackageRoot\MySubFolder. Add the Download Content brick when using $PackageRoot.

#### Destination Directory
*Required*

The full path of the destination directory

#### Include Sub Directories
*Required* — Default: `True`

Include subdirectories in copy operation

#### Overwrite Files
*Required* — Default: `True`

Overwrite existing files in the destination directory

## Details

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

## Raw JSON definition

**JSON**

```json
{
  "category": "fileAndDirectory",
  "description": "Copy a directory from source to destination. This PowerBrick can be used to copy files during a package installation or for general file management tasks.",
  "developerVendor": "CapaSystems A/S",
  "displayName": null,
  "id": "Directory-Copy",
  "name": "Copy Directory",
  "parameters": [
    {
      "allowManualInput": null,
      "defaultValue": "",
      "defaultValueObject": null,
      "description": "The full path to the source directory. Example: C:\\Temp\\MyFolder or $PackageRoot\\MySubFolder. Add the Download Content brick when using $PackageRoot.",
      "id": "SourceDirectory",
      "name": "Source Directory",
      "regExValidation": "",
      "required": true,
      "type": "TextBox",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": null,
      "defaultValue": "",
      "defaultValueObject": null,
      "description": "The full path of the destination directory",
      "id": "DestinationDirectory",
      "name": "Destination Directory",
      "regExValidation": "",
      "required": true,
      "type": "TextBox",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": null,
      "defaultValue": "True",
      "defaultValueObject": null,
      "description": "Include subdirectories in copy operation",
      "id": "IncludeSubDirectories",
      "name": "Include Sub Directories",
      "regExValidation": "",
      "required": true,
      "type": "Boolean",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": null,
      "defaultValue": "True",
      "defaultValueObject": null,
      "description": "Overwrite existing files in the destination directory",
      "id": "OverwriteFile",
      "name": "Overwrite Files",
      "regExValidation": "",
      "required": true,
      "type": "Boolean",
      "value": null,
      "values": [],
      "valuesObject": null
    }
  ],
  "powershell": {
    "base64Encoded": true,
    "function": "RnVuY3Rpb2..."
  },
  "type": "powerbrick",
  "version": "2026.7.2.1"
}
```
