locked
Copy Document From on subsite to another subsite + REST API + SharePoint 2013 Designer Workflow(On Premise) RRS feed

  • Question

  • I have 2 different sites under same site collection on SharePoint 2013(on Premise). Initially file will be uploaded in one site. After the file approval I wanted to Copy that file to another site(sibling site) under same site collection.

    Let me know if this is possible using SharePoint 2013 designer workflow? If Yes, how can I achieve this?

    Thursday, September 13, 2018 8:05 AM

Answers

  • Hi,

    There is no OOB workflow action in SharePoint designer to copy documents cross site. And, the copyTo method does not support to copy files cross sites, so the workflow would fail to copy files to another site.

    As a workaround, you can configure Content Organizer to automatically route the approved documents to a library in another site.

    You can enable “Redirect Users to the Drop Off Library” for Content Organizer to enforce the Content Organizer. This automatically redirects users to the Drop Off Library when they try to upload a document. Create a rule to rout documents which approved status is Approved to another library in another site.

    Or, you can create a workflow to copy the approved documents from the source library to Drop Off library in the site and configure content organizer rule to move the file to target site.

    About how to configure the Content Organizer to route documents.

    Another method, you can use PowerShell to copy files to another site. Schedule PowerShell script in Task Scheduler to automatically run it at a schedule time.

    Demos of copying files using PowerShell:

    https://gallery.technet.microsoft.com/office/PowerShell-CopyMove-1946d2af

    http://www.sharepointdiary.com/2016/03/copy-files-between-document-libraries-using-powershell-in-sharepoint.html

    Best regards,

    Linda Zhang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Friday, September 14, 2018 8:19 AM

All replies

  • The out of box solution may cannot meet your requirement.

    You can try event receiver.


    Justin Liu Office Servers and Services MVP, MCSE
    Senior Software Engineer
    Please Vote and Mark as Answer if it helps you.

    Friday, September 14, 2018 2:19 AM
  • Hi,

    There is no OOB workflow action in SharePoint designer to copy documents cross site. And, the copyTo method does not support to copy files cross sites, so the workflow would fail to copy files to another site.

    As a workaround, you can configure Content Organizer to automatically route the approved documents to a library in another site.

    You can enable “Redirect Users to the Drop Off Library” for Content Organizer to enforce the Content Organizer. This automatically redirects users to the Drop Off Library when they try to upload a document. Create a rule to rout documents which approved status is Approved to another library in another site.

    Or, you can create a workflow to copy the approved documents from the source library to Drop Off library in the site and configure content organizer rule to move the file to target site.

    About how to configure the Content Organizer to route documents.

    Another method, you can use PowerShell to copy files to another site. Schedule PowerShell script in Task Scheduler to automatically run it at a schedule time.

    Demos of copying files using PowerShell:

    https://gallery.technet.microsoft.com/office/PowerShell-CopyMove-1946d2af

    http://www.sharepointdiary.com/2016/03/copy-files-between-document-libraries-using-powershell-in-sharepoint.html

    Best regards,

    Linda Zhang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Friday, September 14, 2018 8:19 AM
  • Hi,

    Is there any update?

    Does the information help you?

    If yes, you can mark it as the answer to help others who meet the similar issue in this forum.

    Best regards, 

    Linda Zhang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Wednesday, October 3, 2018 8:57 AM