Transfer Files

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.

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

Type
The selection mode.
  • File: Select a single file.
  • Folder: Select a single folder.
  • Files in folders: Select a folder and apply filters to select files within it.
Source
The path to the file or folder to select.
Include subfolders
Whether to include subfolders when selecting multiple files within a folder.
Filter by file extension
Enable filtering files by their extension (e.g. 'xlsx;xlsm').
File extensions
Semicolon-separated list of file extensions to include (e.g. 'xlsx;xlsm;xls'). Case-insensitive unless 'Case sensitive (extensions)' is enabled.
Case sensitive (extensions)
Treat the entered extensions as case sensitive when matching.
Filter by file name
Enable filtering by file name pattern with wildcards or regular expression.
File name filter pattern
Pattern for file name filtering. With type 'Wildcard', use '*' and '?'. With type 'Regex', enter a Java regular expression.
File name filter type
Choose how to interpret the file name pattern: wildcard or regular expression.
Case sensitive (names)
Make file name filtering case sensitive.
Include hidden files
Include hidden files in the selection.
Include special files
Include special file types (workflows etc).
Filter by folder name
Enable filtering of folders by name pattern before descending into them.
Folder name pattern
Pattern for folder name filtering. Use '*' and '?' with filter type 'Wildcard'. With type 'Regex', enter a Java regular expression.
Folder name filter type
Choose how to interpret the folder name pattern: wildcard or regular expression.
Case sensitive (folders)
Make folder name filtering case sensitive.
Include hidden folders
Descend into folders that are hidden (if they otherwise pass filters).
Follow symlinks
Follow symbolic links while traversing folders (only relevant when selecting a folder).
Delete source files / folders
Delete all files/folders that have been successfully copied from 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 / folders' option is activated and something goes wrong during the deletion process the node will fail.
Destination path
Select a file system and destination to copy/move files/folders to.
Create missing folders
If enabled, missing folders in the specified path will be created automatically.
Overwrite policy
How to handle files to be copied already existing in destination folder
  • Fail: Will issue an error during the node's execution (to prevent unintentional overwrite).
  • Ignore: Will ignore if a file already exists and continue the copying process.
  • 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 will continue.
Destination file path
Depending on the selected mode the location of the files/folders to be copied to the destination folder will differ.
  • File/folder only: Copy only the selected file/folder itself into the destination folder, without recreating any parent directories from the source path.
  • Full path: Recreate the full directory structure from the source path inside the destination folder. For example, if the source is src_folder/src_subfolder and the destination is dest_folder, the content will be copied to dest_folder/src_folder/src_subfolder.
  • Path after prefix: Recreate the directory structure from the source path, but ignore the specified folder prefix. For example, if the prefix is src_folder and the source path is src_folder/src_subfolder, the content will be copied to dest_folder/src_subfolder. Note: In special cases this option may attempt to copy the source to a location outside the specified destination, in which case the node will fail.
Folder prefix
The folder prefix (the beginning of the path) to be ignored when using 'Path after prefix' mode.
Detailed output
If selected the output will not only show the folder that has been copied/moved but also all the files/folders it contains.

Input Ports

Icon
The source file system connection.
Icon
The destination file system connection.

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.

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.