Delete Files/Folders (Labs)

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.


Read from
Select a file system on which you want to delete file(s) or folder(s). There are three default file system options to choose from:
  • Local File System: Allows you to delete a file/folder from your local system.
  • Mountpoint: Allows you to delete a file/folder on a mountpoint. When selected, a new drop-down menu appears to choose the mountpoint. Unconnected mountpoints are grayed 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 that should get deleted 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.
To read 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 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.
Select whether you want to delete a single file, a folder or multiple files in a folder. When deleting files in a folder, you can set filters to specify which files and subfolders to include (see below).
Filter options
Only displayed if the mode Files in folder is selected. Allows to specify which files should be deleted according to their file extension and/or name. It is also possible to delete hidden files. The folder filter options enable you to specify from which folders the files should be deleted based on their name and hidden status. Note that the folders themselves will not be deleted, only the files they contain.
Include subfolders
If this option is checked, the node will delete 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.
File or Folder
Enter a path to a file or folder. 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 file/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.
Abort if delete fails
If this option is checked, the node will abort 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

The file system connection.

Output Ports

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.


This node has no views


  • No workflows found



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.