Deletes a file from the filesystem.
file, remove, delete, local, files, filesystem
In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.
| Display Name | API Name | Default Value | Allowable Values | Description |
|---|---|---|---|---|
| Directory Path | Directory Path | ${absolute.path} | The path to the directory the file to delete is located in. Supports Expression Language: true (will be evaluated using flow file attributes and variable registry) | |
| Filename | Filename | ${filename} | The name of the file to delete. Supports Expression Language: true (will be evaluated using flow file attributes and variable registry) |
| Name | Description |
|---|---|
| success | All FlowFiles, for which an existing file has been deleted, are routed to this relationship |
| not found | All FlowFiles, for which the file to delete did not exist, are routed to this relationship |
| failure | All FlowFiles, for which an existing file could not be deleted, are routed to this relationship |
| Required Permission | Explanation |
|---|---|
| read filesystem | Provides operator the ability to read from any file that NiFi has access to. |
| write filesystem | Provides operator the ability to delete any file that NiFi has access to. |