AquaLogic Interaction Development Kit (IDK) 6.0.0 |

# IFolderManager.CopyFolder Method

Copies all the objects of the source folder to the destination folder recursively, including any content items, Data Entry Templates, Presentation Templates, selection lists, subfolders and all objects in each subfolder.

void CopyFolder(
IFolder sourceFolder,
IFolder destinationFolder
);

#### Parameters

sourceFolder
  The folder to copy; cannot be `null` and must be persisted prior to call.
destinationFolder
  The folder to copy into; cannot be `null` and must be persisted prior to call.

#### Remarks

This method will attempt to copy all the objects in the source folder in an atomic operation. If an error occurs while copying one of the objects, the copying will stop and all changes will be rolled back.

Prior to the call, both the source and destination folders must be stored. A `ContentException` will be thrown if you copy a folder to any of its subfolders. An `InvalidOperationException` will be thrown if you copy a folder to itself.

#### Exceptions

Exception Type | Condition
--- | ---
InvalidOperationException | If you copy a folder to itself or the destination or souce folder has not yet been stored or has been removed.
ContentSecurityException | The user does not have permission to access the destination or source folders.
ContentException | The method call resulted in a Publisher exception.
SoapException | There was a communication problem during the execution of the remote method call.

#### See Also

IFolderManager Interface | Plumtree.Remote.PRC.Content.Folder Namespace