Edit File
edit-fileEdit a text file on an FTP server by replacing a specific string without re-uploading the entire file. Requires exact match and uniqueness unless replaceAll is set.
Instructions
Edit a text file on the FTP server by replacing an exact string, without re-uploading the whole file content. oldText must match exactly (including whitespace) and be unique in the file unless replaceAll is set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| newText | Yes | Text to replace it with | |
| oldText | Yes | Exact text to find in the file | |
| remotePath | Yes | Path of the file on the FTP server | |
| replaceAll | No | Replace every occurrence instead of requiring oldText to be unique (default: false) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileSize | Yes | Size of the file in bytes after the edit | |
| remotePath | Yes | ||
| replacements | Yes | Number of occurrences replaced |