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
To use this component in KNIME, download it from the below URL and open it in KNIME:
Download ComponentDeploy, schedule, execute, and monitor your KNIME workflows locally, in the cloud or on-premises – with our brand new NodePit Runner.
Try NodePit Runner!Do you have feedback, questions, comments about NodePit, want to support this platform, or want your own nodes or workflows listed here as well? Do you think, the search results could be improved or something is missing? Then please get in touch! Alternatively, you can send us an email to mail@nodepit.com.
Please note that this is only about NodePit. We do not provide general support for KNIME — please use the KNIME forums instead.