UK: +44 (0) 20 3922 1222 / AUSTRALIA: +61 (0) 2 9053 9703
Select Page

In SharePoint 2010/2013, there is no out-of-box workflow action to move a file from one library to another. Simple solution is copying the file and deleting it afterwards. But if you are firing the workflow to perform copy on item creation, things may not work as straightforward as expected.

Workflow is likely to work fine for individual files, however if you move 10 files to the library at once you are most likely to end up with failed workflows giving one of the following errors:

The workflow could not copy the item. Make sure the source and destination lists have the same columns and column settings.

The workflow could not update the item, possibly because one or more columns for the item require a different type of information.

This is especially the case if you are using different content types on your lists or libraries, event when they are exactly the same between the two lists.

Trying to troubleshoot this issue, I figured out that it takes some time for SharePoint to actually update content type on new items after they are added to the list or library. An immediately running “copy file” workflow actions causes the item being copied before the correct content type is set and creates a mismatch between source and destination library structures.

Simple solution to the problem is to add a pause to the workflow to wait for a minute before initiating the copy. This lets content type to be set correctly and copy works fine every you are dealing with tens of files.

Surely, it does not require a full minute for the content-type to be updated. Although it’s been mentioned on some forums, setting pause value to a fractional value through a workflow variable is┬ánot seem to be effective, at least on SharePoint Online. So I am planning to implement a custom Short Pause activity to let workflow pause for few seconds.