# 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="https://content.gitbook.com/content/cJYkTyk9qgh7aCR6dHIm/blobs/YhkWbtQxjxCwRKeWKMbs/image.png" 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.
