DeleteFile

Description:

Deletes a file from the filesystem.

Tags:

file, remove, delete, local, files, filesystem

Properties:

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 NameAPI NameDefault ValueAllowable ValuesDescription
Directory PathDirectory 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)
FilenameFilename${filename}The name of the file to delete.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)

Relationships:

NameDescription
successAll FlowFiles, for which an existing file has been deleted, are routed to this relationship
not foundAll FlowFiles, for which the file to delete did not exist, are routed to this relationship
failureAll FlowFiles, for which an existing file could not be deleted, are routed to this relationship

Reads Attributes:

None specified.

Writes Attributes:

None specified.

State management:

This component does not store state.

Restricted:

Required PermissionExplanation
read filesystemProvides operator the ability to read from any file that NiFi has access to.
write filesystemProvides operator the ability to delete any file that NiFi has access to.

Input requirement:

This component requires an incoming relationship.

System Resource Considerations:

None specified.