> For the complete documentation index, see [llms.txt](https://motivlabs.gitbook.io/impulse-user-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://motivlabs.gitbook.io/impulse-user-manual/content-manipulators-motators/folder-manipulator.md).

# Folder Manipulator

The Folder Manipulator allows you to replace or remove a folder path and update any content or binaries to live under the new folder path.&#x20;

## Properties

| Property          | Purpose                                                                                 | Required |
| ----------------- | --------------------------------------------------------------------------------------- | -------- |
| folderPath        | The folder path to replace or remove                                                    | True     |
| newFolderPath     | The new folder path to use. Do not provide a value to remove the specified folder path. | False    |
| folderPathAsRegex | Determines if the `folderPath` value should be used as regex.                           | False    |

## Specifics

This manipulator adjusts both the Folder Motation object and Content Motation objects.&#x20;

### How to use

Set the `folderPath` property to a folder path that should either be replaced or removed.&#x20;

The `contentType` and `fieldName` options are not necessary for this manipulator. If using the UI a whitespace can be used for these values.

### remove a folder path

To remove a folder path, do not set a value for `newFolderPath`. If no value is provided for the property, the specified folder path will be removed. Any content or binary that would have used the removed folder path will instead be updated to the folder path `/` (root folder).&#x20;

### Multiple folders

Often a folder path will consist of multiple folders, not just one. Depending on the connector, these may be separate folders/folder paths which would require a separate folder manipulator. As a result, multiple folder manipulators may be required to achieve the desired result. i.e, Only the last folder in a path should be used and all other folders should be removed.&#x20;

Check a connectors documentation for additional details.&#x20;

## Examples

### Shorten folder path

<figure><img src="https://651785290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnLYwCtfZtrK4s43AVzb4%2Fuploads%2FL8htfBtt9h6uDTF8mnWj%2Fimage.png?alt=media&amp;token=f9c61322-d616-4b8d-88ff-0b2817b75565" alt=""><figcaption></figcaption></figure>

### Replace folder path

<figure><img src="https://651785290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnLYwCtfZtrK4s43AVzb4%2Fuploads%2F4qRDe9p3CoeA68A4dYWV%2Fimage.png?alt=media&amp;token=0103c04d-64fa-4a9a-9173-beb85d5e22c9" alt=""><figcaption></figcaption></figure>

### Remove folder path

<figure><img src="https://651785290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnLYwCtfZtrK4s43AVzb4%2Fuploads%2FjhMBtWUfrg1QkJvdy4FJ%2Fimage.png?alt=media&amp;token=c7711b53-a04d-42ee-96ea-c1ce613493e8" alt=""><figcaption></figcaption></figure>

### Use folder path as regex

<figure><img src="https://651785290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnLYwCtfZtrK4s43AVzb4%2Fuploads%2FTJsq2WTt5X8PUjFKn8Y7%2Fimage.png?alt=media&amp;token=5e0d28fc-a871-4302-9c9f-1ddd72b48479" alt=""><figcaption></figcaption></figure>
