How to delete folders?

Hello,I have got folders created programatically but they will be used only for a while so i have got to create an agent which will delete the folders i which got created in designer!

Can anybody please tell me the codes to do that?

I need to run a scheduled agent which will delete all of them.

Thanking you in advance.

Subject: How to delete folders?

You can get your views (or any other design element) via the NotesNoteCollection. I assume that you can see from the viewname which views to delete.

Dim db As NotesDatabase

Dim nc As NotesNoteCollection

Dim nid As String

Dim doc As NotesDocument

Set nc = db.CreateNoteCollection(False)

nc.SelectViews = True

nc.BuildCollection

nid = nc.GetFirstNoteId

While nid <> “”

Set doc = db.GetDocumentByID(nid)

If Not doc Is Nothing Then

      If doc.GetItemValue("$TITLE")(0) = "whatever" Then

	Call doc.Remove(True)	

      End If

End If

nid = nc.GetNextNoteId(nid)

Wend