cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Copy documents from Document Set to Folder

Hi Everyone

I have a workflow which is trying to achieve two goals, 1) copy documents from a document set in a library (not the docset itself) to another document set (with folder structure) in another library in the same site; and 2) log the details of the copied files to the workflow history. The attached .nwf file is the workflow so far.

At this stage everything works fine EXCEPT that the source document set is replicated in the destination folder. Here are the details of what we're trying to achieve:

Source: Library A > DocSet 1 > Document 1.doc (etc.etc.)

Destination: LIbrary B > DocSet 2 > Folder A > Folder 1 > Document 1.doc (etc. etc.)

The DocSet 2 in Library B is created using a separate workflow and is implemented correctly. The result of the attached workflow looks like this:

Destination: LIbrary B > DocSet 2 > Folder A > Folder 1 > DocSet 1 > Document 1.doc (etc. etc.)

We DO NOT want the source DocSet 1 to appear in Library B, only the documents contained with it.

We have tried to run this workflow (in slightly different iterations) at the Library and Site level and also as a reusable workflow, all without success.

Any thoughts?

Labels: (2)
Reply
6 Replies
Workflow Hero

Re: Copy documents from Document Set to Folder

Would using the Move Document method found in the author.dll be of use here? This way you can move the document and keep version history without moving the folder it is contained in. For more: Nintex Workflow - Move Documents and Preserve Version History - Vadim Tabakman

0 Kudos
Accept as Solution Reply
Not applicable

Re: Copy documents from Document Set to Folder

Hi Andrew

Thanks for your suggestion

Unfortunatly, we need to copy the documents, rather than move them, because they are being handed off from one team to another. The original documents set and its contents need to remain intact for the originating team's records.

Cheers

Justin

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Copy documents from Document Set to Folder

Was there a resolution to this?

0 Kudos
Accept as Solution Reply
Not applicable

Re: Copy documents from Document Set to Folder

Hi Mike

No, not really.....we ended up having to write bespoke Javascript code to achieve the result we wanted

Cheers

Justin

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Copy documents from Document Set to Folder

A possible REST version of a copy. Didn't test in a document set, but works for libraries

[Site Url]/_api/web/folders/GetByUrl('DocSetA')/Files/getbyurl('doc1.docx')/copyTo(strNewUrl='[siteurl]/DocSetB/folderB/doc2.docx',bOverWrite=true)

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Copy documents from Document Set to Folder

Justin,

Were you able to come to a resolution with the suggested options?

0 Kudos
Accept as Solution Reply