Delete Files/Folders

This node deletes the files or folders at a specified location. The location may be a remote location. Folders will also be deleted if they still contain files.

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).
Fail if delete fails
If this option is checked, the node will fail if one of the files could not be deleted. If it is unchecked the output table will contain a column that indicates if a file/folder got successfully deleted or not.

Input Ports

Icon
The file system connection.

Output Ports

Icon
Table containing the list of files that have been deleted. If deletion is allowed to fail, there is an additional column, that will indicate if the deletion was successful or not.

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.