This should be a simple question, and it probably has a simple answer which escapes me. I need some agent code to run on a schedule to simply run on all docs in a specific folder to remove them from the folder not delete them. I’ve tried @Command([RemoveFromFolder]), but apparently that cannot be run in an agent unless the target is none, therefore cannot be scheduled. I must admit that I’m not a developer, so I’m fumbling through this. I’ve searched the forum to no avail. Any help is much appreciated. Thanks!
Subject: Remove From Folder Agent
Example in Designer help under “RemoveAllFromFolder” method of NotesViewEntryCollection class:This script removes all the documents under the category “craft projects” from the Christmas folder and puts them in the “Leisure time” folder:
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim vc As NotesViewEntryCollection
Set db = session.CurrentDatabase
Set view = db.GetView(“Christmas”)
Set vc = view.GetAllEntriesByKey(“craft projects”)
Call vc.RemoveAllFromFolder(“Christmas”)
Call vc.PutAllInfolder(“Leisure time”)
…
For your purposes, you might change
Set vc = view.GetAllEntriesByKey(“craft projects”)
to
Set vc = view.AllEntries