Replaces strings in files in a specific folder. See the Appendix for details about how to create the filters necessary to select the files you wish.
...
This operation is suitable for files < 100MB, but not for very large files. The files are stored fully in memory during the replacement. Matching files are overwritten with the modified text. Files that seem to be binary in nature are skipped in this operation.
Info |
---|
Lines that begin with "#" are ignored. |
Environment/Instance Properties
...
Property Name | Property Code | Required | Description |
---|---|---|---|
Inputs
Input Name | Input Code | Required | Description |
---|---|---|---|
Source Path |
| No | The source directory path, files in this folder are eligible for property replacement. The |
File Filter |
| No | Wildcard compatible expression to select file(s). You can enter multiple filter expressions separated by ##. Leave empty to select all files. The ## performs an OR expression. |
File Exclude Filter |
| No | Wildcard compatible expression to exclude file(s) OR folders. You can enter multiple filter expressions separated by ##. Leave empty to select all files. The ## performs an OR expression. |
Needle Text | FDFILE_INP_REPLACE_NEEDLE | Yes | The string or regular expression to search for in the files |
Replace Text | FDFILE_INP_REPLACE_TARGET | No | The text that will replace the matches the plugin operation finds. Leaving it blank is acceptable, all the matches will be deleted in this case. |
Whole Word Only | FDFILE_INP_REPLACE_WHOLE_WORD_ONLY | No | Should matches only be found when surrounded by word boundaries such as a space, punctuation, or the beginning or end of a line? |
Case Insensitive | FDFILE_INP_CASE_INSENSITIVE | No | Should matches be performed case-insensitively? |
Quote Pattern | FDFILE_INP_QUOTE_PATTERN | No | If true, the needle will be treated literally as a string. If false, the needle is a regular expression. |
Outputs
Output Name | Required | Description |
---|---|---|
Artifacts
This operation delegates consumes/produces artifacts decision to the workflow developer. Check Consumes Artifacts on the workflow step editor if this operation requires artifacts to be delivered prior to execution of the script. Check Produces Artifacts on the workflow step editor if this operation creates artifacts. The artifacts folder is available via the FD_ARTIFACTS_DIR
variable.
...