putAllInFolder (DocumentCollection - Java)

Adds all the documents in the collection to the specified folder. If the folder does not exist in the document's database, it is created.

Defined in



public void putAllInFolder(String folderName)
    throws NotesException
public void putAllInFolder(String folderName, boolean createonfail)
    throws NotesException


String folderName

The name of the folder in which to place the documents. The folder may be personal if the script is running on the workstation. If the folder is within another folder, specify a path to it, separating folder names with backward slashes, for example, "Vehicles\\Bikes".

boolean createonfail

If true (default), creates the folder if it does not exist. If false, throws an exception if the folder does not exist.


For remote (IIOP) operations only, this method moves the current pointer to the first document in the collection.

If a document is already inside the folder you specify, putAllInFolder does nothing for that document.