Hub
Pricing About
ComponentComponent

Edit Path Variable Filename

takbb profile image
Versionv3Latest, created on 
Jan 31, 2024 12:52 PM
Drag & drop
Like
Use or download
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

Component details

Input ports
  1. Type: Flow Variable
Output ports
  1. Type: Flow Variable

Used extensions & nodes

Created with KNIME Analytics Platform version 4.7.8
  • Go to item
    KNIME Base nodesTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.7.8

    knime
  • Go to item
    KNIME Basic File System ConnectorsTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.7.7

    knime
  • Go to item
    KNIME JavasnippetTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.7.0

    knime
  • Go to item
    KNIME Quick FormsTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.7.4

    knime

This component does not have nodes, extensions, nested components and related workflows

Legal

By using or downloading the component, you agree to our terms and conditions.

KNIME
Open for Innovation

KNIME AG
Talacker 50
8001 Zurich, Switzerland
  • Software
  • Getting started
  • Documentation
  • Courses + Certification
  • Solutions
  • KNIME Hub
  • KNIME Forum
  • Blog
  • Events
  • Partner
  • Developers
  • KNIME Home
  • Careers
  • Contact us
Download KNIME Analytics Platform Read more about KNIME Business Hub
© 2025 KNIME AG. All rights reserved.
  • Trademarks
  • Imprint
  • Privacy
  • Terms & Conditions
  • Data Processing Agreement
  • Credits