Create File/Folder Variables

This node allows to create path flow variables. This is done by selecting a base folder and then defining a list of paths pointing to files/folders relative to the base folder. After executing the node the specified list of paths is accessible for subsequent nodes via flow variables.

Note: The default base folder is the working directory of the workflow data area, as defined by “.“ in the Folder field.

This node can access a variety of different file systems. More information about file handling in KNIME can be found in the official File Handling Guide.

Options

Create for
Select a file system to which your file names are related. There are three default file system options to choose from:
  • Local File System: Allows you to select a folder on your local system.
  • Mountpoint: Allows you to read from a mountpoint. When selected, a new drop-down menu appears to choose the mountpoint. Unconnected mountpoints are greyed out but can still be selected (note that browsing is disabled in this case). Go to the KNIME Explorer and connect to the mountpoint to enable browsing. A mountpoint is displayed in red if it was previously selected but is no longer available. You won't be able to save the dialog as long as you don't select a valid i.e. known mountpoint.
  • Relative to: Allows you to choose whether to resolve the path relative to the current mountpoint, current workflow or the current workflow's data area. When selected a new drop-down menu appears to choose which of the three options to use.
It is possible to use other file systems with this node. Therefore, you have to enable the file system connection input port of this node by clicking the ... in the bottom left corner of the node's icon and choose Add File System Connection port.
Afterwards, you can simply connect the desired connector node to this node. The file system connection will then be shown in the drop-down menu. It is grayed out if the file system is not connected in which case you have to (re)execute the connector node first. Note: The default file systems listed above can't be selected if a file system is provided via the input port.
Folder
Enter a valid base location for your paths. The required syntax of a path depends on the chosen file system, such as "C:\path\to\file" (Local File System on Windows) or "/path/to/file" (Local File System on Linux/MacOS and Mountpoint). For file systems connected via input port, the node description of the respective connector node describes the required path format. You can also choose a previously selected folder from the drop-down list, or select a location from the "Browse..." dialog. Note that browsing is disabled in some cases:
  • Mountpoint: Browsing is disabled if, the selected mountpoint isn't connected. Go to the KNIME Explorer and connect to the mountpoint to enable browsing.
  • File systems provided via input port: Browsing is disabled, if the connector node hasn't been executed since the workflow has been opened. (Re)execute the connector node to enable browsing.
The location can be exposed as or automatically set via a path flow variable.
File/Folder variables
A list of file/folder locations that will form a path with the selected base folder. Enter the name of the flow variable in the Variable name column and write the name of the file/folder in the Value column. In case of a file also fill in the File extension column. These will be added to the path shown in the Base location column.

Input Ports

Icon
Input variables (optional).
Icon
The file system connection.

Output Ports

Icon
Flow Variables with path information.

Popular Successors

Views

This node has no views

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.