SharePoint 2013 Copy entire library to different site collection

I am trying to automate the archival process of a document library in 2013. I am currently working on testing a workflow with a move command, However, I am getting an error that doesn't make sense to me. Here is what that portion of the workflow looks like:

The error I am getting is: System.Activities.Statements.WorkflowTerminatedException: Value does not fall within the expected range.

I am trying to copy or move the folders from one library to another library in a different site collection to archive. Any help would be appreciated.

Hi @rniles68,

Please try the following:

  1. Try to change the source and target URLs, probably hardcode it without the variables, and also try to move within the same site collection.

  2. Try to test the action Remove Folder by Url with some test folder. Does it work?

  3. Could you also share a screenshot with the action properties? like this.

image

Best regards,
Petr
Plumsail team

Below is a screen shot, I am testing the copy function with all hard coding, I will test the remove folder next. My other workflow does successfully copy, but that is in the same site. Is trying to move it to another site collection a limitation. From reading the docs it seems that would work.
Here is the screen shot from the copy along with the error:

The Removing by URL worked fine in the same site and hard coded, but when I tried it from the other site collection, it did not work. Then I added the Site URL in the Properties as the Source and that worked! I've had the destination in that spot, I think that is the issue, I will test and let you know.

1 Like

I have it working now, that was the key. Using the Source URL for the SharePoint site in Properties.
Once the folders are moved is there a way to delete/remove the empty Document library?

Thanks

1 Like

Hi @rniles68,

Try to add Remove Folder by Url action to the flow after moving the folders and specify the source.

Best regards,
Petr
Plumsail team