0 ×

Transfer Files (Table)

KNIME Filehandling Nodes version 4.4.0.v202104131141 by KNIME AG, Zurich, Switzerland

This node supports the path flow variable to specify the source and destination location. To convert the created path column to a string column which is required by some nodes that have not been migrated yet you can use the Path to String node. For further information about file handling in general see the File Handling Guide.

This node copies or moves files from a source (folder or file) to another folder. The node offers options to either specify the destination based on a column in the input table or via a file chooser. If the "Delete source files (move)" option is checked the node performs a move operation for which the source files will be deleted after the copying process is done.

Options

Source column
Allows to select the column containing the paths to the files/folders that must be copied/moved.
From table
Allows to select the column containing the destination, i.e., the new location and names of the files/folders to be copied/moved.
Note: If the source references a file/folder the destination also has to be a file/folder.
From file chooser
This option allows you to specify a folder where you want to copy/move the (source) files/folders to. There are three default file system options to choose from:
  • Local File System: Allows you to select a location on your local system.
  • Mountpoint: Allows you to write to 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. For this 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 Destination File System Connection.
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 greyed 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.
Create missing folders
Select if the folders of the selected output location should be created if they do not already exist. If this option is unchecked, the node will fail if a folder does not exist.
Transfer policy
  • Overwrite: Will replace any existing file.
  • Overwrite if newer: Will replace any existing file if the source file's last modified date is after the destination file's last modified date, otherwise the file will not be overwritten and the copy process is being continued.
  • Ignore: Will ignore if a file already exists and continues the copying process.
  • Fail: Will issue an error during the node's execution (to prevent unintentional overwrite).
Source folder truncation
Depending on the selected strategy the folder containing the files/folders to copy/move is being truncated differently, i.e., this option allows to modify the resulting (destination) folder structure. For the remainder assume that folder/other/ is the selected folder and it contains the file folder/other/subfolder/file.txt
  • Keep full path: This selection ensures that the folder's path is not being truncated, i.e., the destination folder will contain the entry folder/other/subfolder/file.txt
  • Keep source folder only: This selection ensures that anything preceding the source folder's name is being truncated, i.e., the destination folder will contain the entry other/subfolder/file.txt
  • Truncate full path: This selection ensures that the folder's path is being fully truncated, i.e., the destination folder will contain the entry subfolder/file.txt.
  • Truncate: This selection truncates the first occurrence in the folder's path matching the regular expression, i.e., the destination folder will contain the entry folder/subfolder/file.txt given the regular expression other.*.
If it is not possible to apply the selected truncation strategy the node will fail during execution.
Delete source files / folders
If this option is checked all files which have been successfully copied to the destination folder will be deleted in the source folder. The output contains an additional column indicating if the file has been deleted (true) or not (false).
Fail on unsuccessful deletion
If the 'Delete source files (move)' option is activated and something goes wrong during the deletion process the node will fail. This option is only available if the before mentioned option is selected.
Verbose output
If selected the output will not only show the folder that has been copied/moved but also all the files/folders it contains.
Fail if source does not exist
If selected the node will fail in case the source file/folder to copy/move does not exist.

Input Ports

Icon
The input table containing a Path column.

Output Ports

Icon
A table revealing the files/folders which were copied/moved. It contains a source and destination path column as well as a folder identifier, and a copy status column. Additionally, if Delete source files / folders is selected the output contains a source deleted column and if Fail if source does not exist is unchecked the output has a source exist(ed) column.

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.