# Delete File

> Deletes a file, optionally searching subfolders for the same file name.

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

Delete a file

## Parameters

#### File Path
*Required*

The full path of the file you want to delete - ex. C:\ProgramData\Application\File.ext

#### Search in subfolders
*Required* — Default: `False`

With this option you could search for the specified file name in subdirectories and also delete them

## Details

- **Category:** File and directory
- **Brick ID:** `File-Delete`

## Raw JSON definition

**JSON**

```json
{
  "category": "fileAndDirectory",
  "description": "Delete a file",
  "developerVendor": "CapaSystems A/S",
  "displayName": null,
  "id": "File-Delete",
  "name": "Delete File",
  "parameters": [
    {
      "allowManualInput": null,
      "defaultValue": "",
      "defaultValueObject": null,
      "description": "The full path of the file you want to delete - ex. C:\\ProgramData\\Application\\File.ext",
      "id": "File_Path",
      "name": "File Path",
      "regExValidation": "",
      "required": true,
      "type": "TextBox",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": null,
      "defaultValue": "False",
      "defaultValueObject": null,
      "description": "With this option you could search for the specified file name in subdirectories and also delete them",
      "id": "SearchSubFolders",
      "name": "Search in subfolders",
      "regExValidation": "",
      "required": true,
      "type": "Boolean",
      "value": null,
      "values": [],
      "valuesObject": null
    }
  ],
  "powershell": {
    "base64Encoded": true,
    "function": "RnVuY3Rpb2..."
  },
  "type": "powerbrick",
  "version": "2026.7.2.1"
}
```
