Copy/Move Documents to Other Databases

Tag: CopyMoveDocsToDbs

The CopyMoveDocsToDbs action, along with the applicable SetParam child actions, lets you automate the Copy/Move Documents to Multiple Databases process.

Detailed Description

All options available within the 'Copy/Move Documents to Multiple Databases' dialog are available to set via SetParam options and their values. See table for notes about compatibility between different options.

The FilePath value MUST be set in order for this process to be carried out. This file is easy to create by simply selecting the target databases from within the 'Copy/Move Documents to Multiple Databases' dialog by adding your databases the the current list, and then clicking 'Save'. The resulting XML file's path can be plugged in as the FilePath value.

image2022-8-19_17-42-51.png

Tag Attributes

Attributes

Attribute Value

Value Description

Checkbox

True / False

Toggles between using CheckBox Selection or Focus mechanics - Required

FilePath

User definable

Filepath to the XML file containing the list of target databases - Required

SetParam Options

Attributes

Attribute Value

Value Description

Mode

Standard

ForceCreate

ForcePush

IncrementSeqNum

IncrementSeqNumIfExist

This will set the Copy mode for the process - Required when selecting Copy

CheckFolders

True / False

https://www2.ytria.com/icons/ecblank.gif N/A - Required

FolderSource

SetFolders

GetFolders

https://www2.ytria.com/icons/ecblank.gif N/A - Required

EditSetFolders

User definable

The folders to copy or move the documents to. Separate folder names with a semicolon Required with <SetParam field="FoldersSource" value="SetFolders"/>

EditTemplateFolder

User definable

The name of the folder to use as a template for the new folders to be created - Not Required

Copy

Blank value

Will trigger a Copy operation - Required – One of either Field

Move

Blank value

Will trigger a Move operation - Required – One of either Field

Example Scripts

XML
<CopyMoveDocsToDbs checkbox="true" KeepAlive="true" FilePath="D:\Activities\09 Dec 2015\AutomationListDbs.xml">


XML
<ytriaAutomation>
	<Load Server="ACME01/ACME">
		<Load Database="dbtest\maildbtest.nsf" Select="True"/>
	</Load>
	<Select target="tree" category="ByNoteID" value="2350:2354"/>
	<CopyMoveDocsToDbs checkbox="true" KeepAlive="true" FilePath="D:\Activities\09 Dec 2015\Input_Database_list.xml">
		<SetParam field="CheckFolders" value="true"/>
		<SetParam field="FoldersSource" value="SetFolders"/>
		<SetParam field="EditSetFolders" value="TestFolder1;TestFolder2;TestFolder3"/>
		<SetParam field="EditTemplateFolder" value="TemplateTestFolderAutomation"/>
		<SetParam field="SetCopyMove" value="Move"/>
	</CopyMoveDocsToDbs>
</YtriaAutomation>

In the script above, the database "dbtest\maildbtest.nsf" will be loaded and the two documents whose NoteIDs are indicated will be selected. The action CopyMoveDocsToDbs will trigger 'Copy/Move Documents to Multiple Databases' operation to be carried out , moving these two documents to three different target folders named TestFolder1, TestFolder2, and TestFolder3 newly created, within the databases that are defined in the 'Input_Database_list.xml' file, using the template 'TemplateTestFolderAutomation' as the template for the folders. These documents will not remain in the original database.