---
title: "Action: Add, Replace or Remove file / Add blank page / Rename file"
description: "## Configuration options when Action is AddOrReplaceFile If the selected action is **AddOrReplaceFile**, the following configuration option is available: - **[File](https://extensionkit.unitfly.com/documentation/document-processing-action-add-replace-or-remove-file/#file)** ## File *State Actions > State Action [1] > Action: AddOrReplaceFile > Configuration > File* *Displayed only when Action…"
url: "https://extensionkit.unitfly.com/documentation/document-processing-action-add-replace-or-remove-file/"
updated: "2026-09-28"
category: Configurations / Document Processing / Simple Rule Configuration
---

# Action: Add, Replace or Remove file / Add blank page / Rename file

## Configuration options when Action is AddOrReplaceFile

If the selected action is **AddOrReplaceFile**, the following configuration option is available:

- **[File](https://extensionkit.unitfly.com/documentation/document-processing-action-add-replace-or-remove-file/#file)**

## File

*State Actions > State Action [1] > Action: AddOrReplaceFile > Configuration > File*

*Displayed only when Action is AddOrReplaceFile.*

When expanded, the following options are available by default: **File action**, **Source filename wildcards**, **Target search**, and **Delete original file**.

### File action

*State Actions > State Action [1] > Action: AddOrReplaceFile > Configuration > File > File action*

*Displayed only when Action is AddOrReplaceFile.*

Specifies the action to be executed with the file. Select from the following options:

- **AddToCustomObject (default)**: Add the file to a custom object.
- **ReplaceOnCustomObject**: Replace an existing file on a custom object.
- **AddFromCustomObject**: Add a file from a custom object.
- **ReplaceFromCustomObject**: Replace a file from a custom object.

### Source filename wildcards

*State Actions > State Action [1] > Action: AddOrReplaceFile > Configuration > File > File action: AddToCustomObject / ReplaceOnCustomObject / ReplaceFromCustomObject > Source filename wildcards*

*Displayed only when Action is AddOrReplaceFile, and File action is NOT AddFromCustomObject.*

Specifies the filename wildcards used to select files from the source object.

1. Expand **Source filename wildcards**.
2. Click on **Add placeholderText**.

### Target search

*State Actions > State Action [1] > Action: AddOrReplaceFile > Configuration > File > Target search*

*Displayed only when Action is AddOrReplaceFile.*

Specifies the search filters to find the target object in the vault, either for adding or replacing files. Multiple search filters are combined using the OR operator (at least one filter must be satisfied). Multiple search conditions within a single filter are combined using the AND operator (all conditions must be satisfied).

1. Expand **Target search**.
2. Click on **Add Search**.
3. Expand **Search [1]**.

When expanded, the following fields are available for configuration: **Status field conditions, Property conditions,** and **Search result type**.

When Search is added, the **Target search sort** section becomes available, containing**Sort by**and **Sort direction**options. For details on the target search results sorting options, please refer to the [Common features](https://extensionkit.unitfly.com/documentation/common-features/) page.

#### Status field conditions

*State Actions > State Action [1] > Action: AddOrReplaceFile > Configuration > File > Target search > Search [1] > Status field conditions*

*Displayed only when Action is AddOrReplaceFile.*

These additional search conditions aid the search process by searching objects defined from the target based on a specific status.

1. Expand **Status field conditions**.
2. Click on **Add Status field condition**.
3. Expand **Status field condition [1]**.

Additional fields become available: **Field,** **Value type,** and [Operator](https://extensionkit.unitfly.com/documentation/common-features/#operatorcommon).

#### Field

*State Actions > State Action [1] > Action: AddOrReplaceFile > Configuration > File > Target search > Search [1] > Status field conditions > Field*

*Displayed only when Action is AddOrReplaceFile.*

Defines the status field as an additional search condition. Choose one of the following:

- **ID:** This option refers to the Object ID.
- **ExternalID:** This option refers to the Object ID from an external system.
- **Type:** This option refers to the Object Type.
- **Version:** This option refers to the object’s version.
- **Deleted:** If set to True, it refers to objects that have been deleted but not destroyed. If set to False, it refers to objects that have not been deleted.

#### Value type

*State Actions > State Action [1] > Action: AddOrReplaceFile > Configuration > File > Target search > Search [1] > Status field conditions > Value type*

*Displayed only when Action is AddOrReplaceFile.*

Specifies expected property value. Select one of the following:

- **Static:** Select this option to set a static value as a target search condition.
- **FromSource:** Select this option to set a value from the source object.
- **Dynamic:** Select this option to set a dynamic value as a target search condition.

#### Property conditions

*State Actions > State Action [1] > Action: AddOrReplaceFile > Configuration > File > Target search > Search [1] > Property conditions*

*Displayed only when Action is AddOrReplaceFile.*

Search property conditions. Property values can be static or dynamic.

1. Expand **Property conditions**.
2. Click on **Add Property condition**.
3. Expand **Property condition [1]**.

Additional fields become available: **Property, Operator, Value** and **Mode**.For further description and details, please refer to the [Common features](https://extensionkit.unitfly.com/documentation/common-features/) page.

#### Search result type

*State Actions > State Action [1] > Action: AddOrReplaceFile > Configuration > File > Target search > Search [1] > Search result type*

*Displayed only when Action is AddOrReplaceFile.*

Expected search result type.

- **Any (default)**
- **None**

### Target filename wildcards

*State Actions > State Action [1] > Action: AddOrReplaceFile > Configuration > File > File action: ReplaceOnCustomObject / AddFromCustomObject / ReplaceFromCustomObject >Target filename wildcards*

*Displayed only when Action is AddOrReplaceFile, and File action is NOT AddtoCustomObject.*

Specifies the filename wildcards used to select files from the target object.

1. Expand **Target filename wildcards**.
2. Click on **Add placeholderText.**

### Delete original file

*State Actions > State Action [1] > Action: AddOrReplaceFile > Configuration > File > Delete original file*

*Displayed only when Action is AddOrReplaceFile.*

Specifies whether the original file should be deleted when a new file is added or an existing file is replaced.

- **No (default)**
- **Yes**

---

## Configuration options when Action is RemoveFile

If the selected action is **RemoveFile**, the following configuration option is available:

- [File](#remove-file-file)

-

## File

*State Actions > State Action [1] > Action: AddOrReplaceFile / RemoveFile > Configuration > File*

*Displayed only when Action is AddOrReplaceFile or RemoveFile.*

When expanded, the following options are available by default: **Remove file action, Source filename wildcards, Convert to single-file** and **Delete object of removed file**.

### Remove file action

*State Actions > State Action [1] > Action: RemoveFile > Configuration > File > Remove file action*

*Displayed only when Action is RemoveFile.*

Specifies the action to be executed for removing the file.

- **RemoveFromSourceObject** **(default)**: If this option is selected, the **Source filename wildcard** section become available for adding and entering placeholder text. For details, please click [here](#sourcefilenamewildcards).
- **RemoveFromCustomObject**: If this option is selected, the**[Target filename wildcards](#targetfilenamewildcards)** and**[Target search](#targetsearch)** sections become available. For details, please click on each option.

### Convert to single-file

*State Actions > State Action [1] > Action: RemoveFile > Configuration > File > Convert to single-file*

*Displayed only when Action is RemoveFile.*

Specifies whether the object needs to be converted to a single-file after file deletion. NOTE! Conversion to a single-file can only be done if the object contains only one file.

- **No (default)**
- **Yes**

### Delete object of removed file

*State Actions > State Action [1] > Action: RemoveFile > Configuration > File > Delete object of removed file*

*Displayed only when Action is RemoveFile.*

Specifies whether object of the deleted file should be deleted too or not.

- **No** (default)
- **Yes**

---

## Configuration options when Action is AddBlankPage

If the selected action is **AddBlankPage**, the following configuration option is available:

- [Filename Wildcards](https://extensionkit.unitfly.com/documentation/document-processing-action-convert-to-pdf-or-undo-pdf-conversion/#filenamewildcards)
- [Blank page](https://extensionkit.unitfly.com/documentation/document-processing-action-add-replace-or-remove-file/#blankpage)

## BlankPage

*State Actions > State Action [1] > Action: AddBlankPage > Configuration > BlankPage*

*Displayed only when Action is AddBlankPage.*

When expanded, the **Blank page placement** field is available.

### Blank page placement

*State Actions > State Action [1] > Action: AddBlankPage > Configuration > BlankPage* > *Blank page placement*

*Displayed only when Action is AddBlankPage.*

Choose whether to insert a blank page as the first page or the last page in the file.

- **LastPage (default)**
- **FirstPage**

---

## Configuration options when Action is RenameFile

If the selected action is **RenameFile**, the following configuration option is available:

- [Filename Wildcards](https://extensionkit.unitfly.com/documentation/document-processing-action-convert-to-pdf-or-undo-pdf-conversion/#filenamewildcards)
- [New name](https://extensionkit.unitfly.com/documentation/document-processing-action-add-replace-or-remove-file/#new-name)
- [Name application mode](https://extensionkit.unitfly.com/documentation/document-processing-action-add-replace-or-remove-file/#name-application-mode)
- [Duplicate index separator](https://extensionkit.unitfly.com/documentation/document-processing-action-add-replace-or-remove-file/#duplicate-index-separator)

## New name

*State Actions > State Action [1] > Action: RenameFile > Configuration > New name*

*Displayed only when Action is RenameFile.*

The name value to apply. Supports placeholders and property expressions. Depending on the name application mode this value will overwrite the existing file name, be added as a prefix, or be added as a suffix.

## Name application mode

*State Actions > State Action [1] > Action: RenameFile > Configuration > Name application mode*

*Displayed only when Action is RenameFile.*

Defines how the generated name is applied to the existing file name.

- **Overwrite** (default): Replaces the entire file name with the generated value.
- **Prefix**: Prepends the generated value to the existing file name.
- **Suffix**: Appends the generated value to the existing file name.

## Duplicate index separator

*State Actions > State Action [1] > Action: RenameFile > Configuration > Duplicate index separator*

*Displayed only when Action is RenameFile.*

Separator inserted before the numeric index when multiple files would receive the same name. For example, with separator '_' the files would be named: 'Report', 'Report_1', 'Report_2'. Leave empty to append the index directly.
