0 ×

Transfer Files

KNIME Filehandling Nodes version 4.3.1.v202101261632 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 copy or move a single file, a complete folder or the files in a selected folder, with the option to include subfolders, to a specified folder. 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

Read from
Select a file system which stores the files/folders you want to copy/move. There are four default file system options to choose from:
  • Local File System: Allows you to select a file/folder from 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.
  • Custom/KNIME URL: Allows to specify a URL (e.g. file://, http:// or knime://protocol). When selected, a spinner appears that allows you to specify the desired connection and read timeout in milliseconds. In case it takes longer to connect to the host / read the file, the node fails to execute.Browsing is disabled for this option.
To copy/move a file/folder from other file systems, click on ... in the bottom left corner of the node icon followed by Add File System Connection port. Afterwards, connect the desired file system connector node to the newly added input port. 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
The location can be exposed as or automatically set via a path flow variable..
Mode
There are three different file/folder modes available:
  • File: Copies a single file.
  • Folder: Copies a single folder with all its files and the underlying folder structure.
  • Files in folder: Copies the files in a folder and creates the necessary folder structure as in the source folder.
Filter options
Only displayed if the mode Files in folder is selected. Allows to specify which files should be included according to their file extension and/or name.It is also possible to include hidden files. The folder filter options enable you to specify which folders should be included based on their name and hidden status. Note that only folders in the file paths of the selected files will be copied.
Include subfolders
If this option is checked, the node will include all files from subfolders that satisfy the specified filter options. If left unchecked, only the files in the selected folder will be included and all files from subfolders are ignored.
Write to
This option allows you to specify a folder where you want to copy your file, files or folder in the end. This option has got the same options, except for the custom URL option, as the Read from option with regards to the file system options.
The location can be exposed as or automatically set via a path flow variable.
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.
If exists
  • Overwrite: Will replace any existing file.
  • 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).
Include selected source folder
If this option is selected, a folder with the name of the last part of the selected path will get included in the copy process,otherwise only the contents of the specified folder will get included in the archive. This option does not work if only a single file should be copied or if the selected folder path ends with .. or .. For example copying the complete workflow data area by specifying the source path with a .. If it is not possible to include the source folder the dialog will show you an error message and 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). Note Folders only get deleted when the Folder option is used.
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.

Output Ports

Icon
The files which should be copied with a source path column, destination path column, a folder identifier column, a copy status column and a deleted source column.

Workflows

Installation

To use this node in KNIME, install KNIME Base nodes from the following update site:

KNIME 4.3

A zipped version of the software site can be downloaded here.

You don't know what to do with this link? Read our NodePit Product and Node Installation Guide that explains you in detail how to install nodes to your KNIME Analytics Platform.

Wait a sec! You want to explore and install nodes even faster? We highly recommend our NodePit for KNIME extension for your KNIME Analytics Platform. Browse NodePit from within KNIME, install nodes with just one click and share your workflows with NodePit Space.

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.