# Delete task

A Delete removes the files and folders on the list from where they are, on this server or on another.

> [!WARNING]
> A Delete does what it is told, to whatever is on the list at that moment. Before a job with a Delete goes into use, put a [breakpoint](Jobs-Breakpoints.md) on the line before it and look at the items it would be given.

## Fields

| Field | What it does | On a new task |
|---|---|---|
| **Item** | what to delete. `{url}` is the item in hand, which is nearly always what you want. An address of your own deletes that instead, once per item. **Browse**. | `{url}` |
| **Keep trying for x seconds** | a file that cannot be deleted, because another program has it open, is tried again once a second this many times | 1 |
| **Ignore folders** | folders on the list are left alone; only files are deleted | off |
| **Delete threads** | how many deletes run at the same time | 20 |
| **Route connection through DMZ when possible** | the connection is made from a DMZ server | |

The task's **Folder Traversal Filter** narrows what is deleted: `*.tmp` deletes the temporary files of the list and leaves the rest.

## What it hands on

What it did **not** delete: the items its filter did not match, and the ones it could not delete. Deleted items leave the list, since they no longer exist.

A file that is already gone when the Delete comes to it counts as deleted, not as a failure.

When something could not be deleted after all tries, the task fails: "Delete failed after …".

## Things to know

- **After a Copy**, the list holds the originals, so a Delete there removes the source files: the usual end of a job that fetches. After a [Move](Task-Move.md) there is nothing left to delete.
- **After a Copy with "After copying, add to list"**, the list holds originals and copies. A Delete then removes both.
- **Folders.** A folder on the list is deleted with what is in it. With a [Find](Task-Find.md) of some depth, the list holds folders and their files; tick **Ignore folders** to remove the files and keep the tree, or **Don't Add Folders** on the Find.
- **Old files.** Deleting by age is a Find with **Last modified: Older** and a Delete behind it: see [Examples](Jobs-Examples.md#4-clean-up-old-files).
- **There is no bin.** What a job deletes is gone, on other servers too. Where that is too sharp, [Move](Task-Move.md) the files to a folder that a second job empties after a week.
