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
- Open your Mail, and then click .
- In the Agent Properties box, enter Delete old mail in the Name field under the Basics tab.
- In the Trigger section, select On event, then select Action menu selection from the list.
- For Target, select All documents in view.
- Close the Agent Properties box.
- In the Programmer's pane, click the Objects tab in the Info List section, then select Document Selection from the list of objects.
- Click Add Condition at the bottom of the Programmer's pane to open the Add Condition dialog box.
- Select the condition By Date.
- 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).
- Click Add to add the condition and close the dialog box.
- Click the Objects tab in the Info List, then select Action from the list of objects.
- Click Add Action to open the Add Action dialog box.
- Select Delete from application in the Action field.
- Click Add to add the action to the agent to close the dialog box.
- Click to save the agent.