# File Replace Content Action

The **File Replace Content Action** node searches and replaces text within a file.

The node reads a file that can be opened and modified by the operating system and replaces a defined string with a new value. The replacement value may include wildcards or variables from the stream.

This allows automated modification of configuration files, project files, or scripts.

#### Input Parameters

**File Path**\
Full path to the file whose content should be modified, including filename and extension.

**To Replace**\
The text string that should be searched for inside the file.

**Replace With**\
The value that will replace the found string.\
This field may contain wildcards or values from the stream.

**IsRegex**\
If enabled, the **To Replace** field is interpreted as a regular expression instead of a plain text string.

**Interpret “Replace With” Input as Literal**\
If enabled, special regular-expression characters in the replacement value are treated as normal text.\
For example, the character `$` will be written literally instead of being interpreted as a regex group reference.

<figure><img src="/files/kPNUkryxwwgSGr3JnG5N" alt="File Replace Content Action" width="375"><figcaption><p>File Replace Content Action</p></figcaption></figure>

#### Behavior

* Opens and modifies the file content
* Replaces all matching occurrences
* Supports plain text or regular expression matching
* Operates on the host running the stream
* Supports asynchronous execution

#### Typical Use Cases

* updating file paths in project files
* renaming sequences inside project or configuration files
* adjusting environment configuration files
* modifying scripts or templates
* preparing delivery or playout configuration files

#### Important Notes

* The file must be accessible and writable by the executing host
* The node directly modifies the file (no backup is created)
* Incorrect replacement patterns may corrupt structured files (e.g., project or XML files)

#### Practical Tip

Always test this node with a copy of the file first.\
Because the modification happens directly inside the file, a wrong replacement string or regex can easily break a project or configuration file.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.helmut.de/helmut4-releases/helmut4-components/streamdesigner/nodes/actions/file-and-folder-22/file-replace-content-action.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
