Metabase > Metabase Assembly Interfaces > IMetabaseObjectDescriptor > IMetabaseObjectDescriptor.MoveTo
MoveTo(Dest: IMetabaseObjectDescriptor);
Dest. Repository object, to which the object should be copied.
The MoveTo method moves one repository object into another.
The destination object should be a non-leaf repository element.
In the repository add two folders with the FOLDER1 and FOLDER2 identifiers.
Add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObjectDescriptor;
MObj2: IMetabaseObjectDescriptor;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("FOLDER1") As IMetabaseObjectDescriptor;
MObj2 := MB.ItemById("FOLDER2") As IMetabaseObjectDescriptor;
MObj.MoveTo(MObj2);
End Sub UserProc;
After executing the example the FOLDER1 folder is moved to the FOLDER2 folder.
See also: