Allows on-the-fly editing of an input path and file name using string concatenation (additon of simple prefix or suffix to a filename) or replacement of filename using regex, and direct replacement of filename extension.
Also allows the folder path to be modified using regex replacement.
Where regex is used, it follows the regex required by the String Manipulation regexReplace function, so any use of a \ within a folder path must be entered as double-backslash \\ so that regex does not misinterpret the character.
Example replacement that could be performed:
For an incoming file path representing
c:\myoutputfolders\excel\somefile.xlsx
Setting:
prefix: accounts-
suffix: -formatted
regex file search: (.*)file
regex file replace $1sheet
regex folder search: (.*)\\myoutputfolders\\(.*)
regex folder replace: $1\\formattedoutputs\\$2
would result in the output file:
c:\formattedoutputs\excel\accounts-somesheet-formatted.xlsx
@takbb Brian Bates 09 October 2022
Update v2 13 November 2022 - now resolves workflow and workflow data relative paths to absolute paths
- Type: Flow Variable