Skip to main content

Delete File

A Delete File node deletes each incoming file. Use it to remove temporary files after the nodes before it have processed them, to clear processed exports from an inbound folder, or to remove files that match a pattern on a schedule.

Delete File accepts only file items, because a data item has no file to delete.

Settings

Exclude Pattern removes matching files from the items the node deletes, using the same syntax as the trigger's Exclude Pattern. The files a run deletes are otherwise the files the trigger selected and the nodes before Delete File passed on.

What the Next Node Receives

Delete File passes on one data item for each deleted file, recording the file's former path, its size, and the time it was deleted, because the file itself no longer exists. A Send Email node after it can report what was removed, and an Aggregate node can combine the data items into one summary.

Errors

A file that no longer exists when the node runs fails with a not-found error. Error Handling rules on the node determine what happens to a failed item.

Delete File vs. File Expiration

File Expiration is a Folder Setting that deletes the files in a folder that have not been modified for a number of days. Use it when the only rule is age and the scope is one folder, with or without its subfolders. Use a Delete File node when the files are selected by pattern or by the nodes before it, when the deletion follows another operation, or when it runs on a trigger other than time.