# File Utilities

<!-- Generated by tools/catalogue/generate.py from flow.service.workflow 5.0.0-beta.39. Don't edit by hand. -->

# File Utilities

The File Utilities category has 7 tasks: 6 in the palette and 1 that isn't. Each entry shows the task's latest revision, the one the palette adds. See [Reading an entry](https://www.useboomerang.io/docs/flow/main/catalogue/overview#reading-an-entry).

## Check File Contains String

Check file contains string.

- **Slug:** `check-file-contains-string`
- **Type:** `template`
- **Revision:** 1
- **Image:** Default task image.

**Parameters**

| Label | Name | Type | Required | Default | Helper text |
| --- | --- | --- | --- | --- | --- |
| Path | `path` | Text | No |  |  |
| Regular Expression | `expression` | Text | No |  |  |
| Flags | `flags` | Text | No |  |  |
| Fail If Not Found | `failIfNotFound` | Boolean | No |  |  |

No results.

## Check File or Folder Exists

Check file or folder exists and fail if not found.

- **Slug:** `check-file-or-folder-exists`
- **Type:** `template`
- **Revision:** 1
- **Image:** Default task image.

**Parameters**

| Label | Name | Type | Required | Default | Helper text |
| --- | --- | --- | --- | --- | --- |
| Path | `path` | Text | No |  |  |
| Regular Expression | `expression` | Text | No |  |  |

No results.

## Create File

Create file in worker.

- **Slug:** `create-file`
- **Type:** `template`
- **Revision:** 3
- **Image:** Default task image.

**Parameters**

| Label | Name | Type | Required | Default | Helper text |
| --- | --- | --- | --- | --- | --- |
| File Path | `path` | Text | No |  |  |
| File Content | `content` | Text Editor | No |  |  |
| Creation Directories | `createDir` | Boolean | No | `false` | Recursively create path as needed |

No results.

## Read File to Parameter

Read file and add contents to tasks result parameter

- **Slug:** `read-file-to-parameter`
- **Type:** `template`
- **Revision:** 1
- **Image:** Default task image.

**Parameters**

| Label | Name | Type | Required | Default | Helper text |
| --- | --- | --- | --- | --- | --- |
| File Path | `path` | Text | No |  |  |

**Results**

| Name | Description |
| --- | --- |
| `content` | File content as a result parameter |

## Replace String in File

Replace String in File.

- **Slug:** `replace-string-in-file`
- **Type:** `template`
- **Revision:** 1
- **Image:** Default task image.

**Parameters**

| Label | Name | Type | Required | Default | Helper text |
| --- | --- | --- | --- | --- | --- |
| Path | `path` | Text | No |  |  |
| Regular Expression | `expression` | Text | No |  |  |
| Replacement String | `replaceString` | Text | No |  |  |
| Flags | `flags` | Text | No |  |  |
| Fail If Not Found | `failIfNotFound` | Boolean | No |  |  |

No results.

## Replace Tokens in Files

Replace parameters between tokens. The default start and end delimiters allow you to replace parameters defined following the parameter reference syntax.

- **Slug:** `replace-tokens-in-files`
- **Type:** `template`
- **Revision:** 2
- **Image:** Default task image.

**Parameters**

| Label | Name | Type | Required | Default | Helper text |
| --- | --- | --- | --- | --- | --- |
| File Path | `path` | Text | No | `$(params.deploy-kubernetes-path)` |  |
| Files | `files` | Text | No | `$(params.deploy-kubernetes-file)` |  |
| Start Delimiter | `tokenStartDelimiter` | Text | No | `\$\(params\.` | Enter regex string, escaping special characters. |
| End Delimiter | `tokenEndDelimiter` | Text | No | `\)` | Enter regex string, escaping special characters. |
| Replacement Values | `allParams` | Text Area | No | `$(allParams)` | New line delimited key value pairs |
| Fail If Not Found | `failIfNotFound` | Boolean | No | `false` |  |

**Results**

| Name | Description |
| --- | --- |
| `files` | List of files where the token was replaced |

## Not in the palette

These tasks are in the catalogue, but the palette doesn't list them because they aren't active. Admins see them in **Admin › Tasks**.

| Task | Slug | Status | Revision | Description |
| --- | --- | --- | --- | --- |
| Read Parameters from File | `read-parameters-from-file` | `inactive` | 1 | Read parameters from file |
