Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim vc As NotesViewEntryCollection
'you can choose other db, including mail db
Set db = session.CurrentDatabase
'choose the right view
Set view = db.GetView("By Category")
'Function of GetAllUnreadEntries returns a collection contains all unread entries in the view.Correspondingly, there is a function of 'GetAllReadEntries in lotutscript
Set vc = view.GetAllUnreadEntries()
'you can iterate the collection and do whatever you like.
Call vc.PutAllInfolder("To Be Read")