Can we Copy specific folder content from Repository from Demo site to other site.

Screenshot of Trados Studio showing the VAMP folder expanded with subfolders: A Guidelines, B Common, C Arc, Import, and Tests.

 

from above image i need to copy VAMP folder to another site.



Generated Image Alt-Text
[edited by: Trados AI at 6:44 AM (GMT 0) on 5 Mar 2024]
emoji
  • As far as I know, there is no easy way to do a complete copy of a folder structure, including contents, from one SDL repository to another. You would need to create the folder structure in the destination repository, export the objects from the source repository, import them into the destination, and then re-create the publications since they cannot be exported/imported. You could write a tool to do all this via SDL API calls, but it is a nontrivial task.
  • Hi Swapnil,
    The way I would do it would be to add all the assets I want moved to a publication, publish it. Get all the .metand .XML files from the published folder. Next I would use content importer to create a filemap file, which will pull in all the metadata associated with the assets. Next you would need to update the folder paths under the target folder attribute in filemap , followed by import and you are done.
  • Hi Swapnil

    I can give you few suggestions on the PowerShell script for copying a folder. For the start, get ISHRemote library from the Powershell Gallery site.
    Then you will need two functions, one for downloading content from the source location to a local drive and the second one for uploading content to the target site
    - Download
    o Get source folder recursively, e.g. $sourceFolderTree = Get-IshFolder -IshSession $ishSession -FolderPath $ishFolderPath –Recurse
    o Loop over folders foreach($sourceFolder in $sourceFolderTree)
    o Get folder path for each folder and make local path out of it $sourceFolderPath = Get-IshFolderLocation -IshSession $ishSession -FolderId $sourceFolder.IshFolderRef
    o Get folder metadata and save it to a Xml file(if needed) $ishSession.Folder25.GetMetadataByIshFolderRef
    o Get logical objects from the current folder: $folderLogicalObjects = Get-IshFolderContent -IshSession $ishSession -FolderId $sourceFolder.IshFolderRef
    o Then you need to distinguish whether it is DocumentObj folder("ISHModule", "ISHMasterDoc", "ISHLibrary", "ISHIllustration", "ISHTEMPLATE") or Publication folder ("ISHPublication")
    o For DocumentObj folder you need to get a list of language objects $folderLanguageObjects = Get-IshDocumentObj -IshSession $ishSession -LogicalId $logicalIds -RequestedMetadata $requestedMetadata then you can get data object using $folderObjectDataPath = Get-IshDocumentObjData -IshSession $ishSession -IshObject $folderLanguageObject -FolderPath $folderPathOnDisk
    o For Publication folder you can use the following cmd-let to get output: Get-IshPublicationOutput. Then you will also need a baseline object and save it to a file ($ishSession.Baseline25.GetBaseline)

    - Upload
    o For upload you will need to create with the script every target folder based on the folder on your local disk (Add-IshFolder)
    o For DocumentObj, Sort files by version, add objects using the Add-IshDocumentObj cmd-let (for images you will need to provide resolutions)
    o For Publication objects you will need to do again sorting by version, add PublicationOutput as well as baseline and baseline items with commands Add-IshBaseline, Set-IshBaselineItem, Add-IshPublicationOutput

    It is much easier if you skip PublicationOutput and Baseline objects. Also remember that this will not copy system LOVs, so Author, Language and others – they need to be created separately (manually)
  • Thanks Everyone !! It's done by exporting objects and importing them using content importer.
  • Hi,

    I am trying to copy a map and its child topics from one repo folder to another in Tridion Docs CMS. I am familiar with using the Content Importer tool but is there a corresponding tool in SDL to Export content out of the CMS?

    Thanks,

    Ann