Sample agent: Deleting documents

Use an agent to delete a subset of documents from a folder.

About this task

You have been saving important messages for months in a folder titled Saved. The folder has become too large, and you want to delete all messages which were created before August, 2006. To do so, complete the following steps:

Procedure

  1. Open your Mail, and then click Create > Agent.
  2. In the Agent Properties box, enter Delete old mail in the Name field under the Basics tab.
  3. In the Trigger section, select On event, then select Action menu selection from the list.
  4. For Target, select All documents in view.
  5. Close the Agent Properties box.
  6. In the Programmer's pane, click the Objects tab in the Info List section, then select Document Selection from the list of objects.
  7. Click Add Condition at the bottom of the Programmer's pane to open the Add Condition dialog box.
  8. Select the condition By Date.
  9. Under Search for documents whose, select date created and is before from the lists in the first two fields respectively, then enter 8/1/06 in the rightmost field (the date field).
  10. Click Add to add the condition and close the dialog box.
  11. Click the Objects tab in the Info List, then select Action from the list of objects.
  12. Click Add Action to open the Add Action dialog box.
  13. Select Delete from application in the Action field.
  14. Click Add to add the action to the agent to close the dialog box.
  15. Click File > Save to save the agent.

Results

To run the agent, open the Saved folder and click Actions > Delete old mail.