Empty ($Trash) using LotusScript

Here is my dilemma.

We have taken the Delete feature off users mail files and created a Deleted Mails Folder where they can drag items that they no longer want.

An agent then runs on this folder and removes all mails older than 30 days. It puts them into the ($Trash) folder as intended.

All well and good until the agent looks in the ($Trash) folder and tries to delete permanantly.

My code snippet

'Remove selected Items out of the $Trash Folder

’

Set db = session.CurrentDatabase

Set folder = db.GetView(“($Trash)”)

Call db.EnableFolder(“$Trash)”)

Set viewentries = folder.AllEntries

’ Repeat until all of the $Trash messages have been processed

For counter = 1 To viewentries.count

Set entry = viewentries.GetnthEntry(counter)

Set doc = entry.Document

If doc.DeliveredDate(0) < purgedatetime.LSlocaltime Then

doc.RemoveFromFolder("($Trash)")			

doc.remove(True)

End If

Next

Call folder.Refresh

Notes:

purgedatetime is calculated at the beginning of the agent by taking todays date and subtracting 30 days from it.

viewentries at this point does not contain any documents and the viewentries.count is 0.

What am I missing wrt. the ($Trash) folder.

If all else fails can I call the command @command(EmptyTrash) from Lotus Script, using evaluate or something similar