Move documents from SharePoint sub site document library to parent site document library ?


Badge +2

Is there any action to move documents from SharePoint document library to another document library. I do not want to copy the document. I need to move the document from sub site library to parent site library.


10 replies

Userlevel 7
Badge +17

that is not possible, but you can copy, ex. using the Office 365 Upload Document action, and then remove the document in the first place.

Regards,

Tomasz

Userlevel 5
Badge +13

There's actually not an action in Nintex Workflow for Office 365 to copy a document from a subsite to a parent site.  The "Upload Document" action only works within the same site.

I had a similar requirement of copying a document from library in the parent site to a library in a child subsite.  I was able to accomplish this by first using the Web Request action with the Copy.asmx web service and the GetItem method (to get document information in XML format), then using the Query XML action (to get the document stream information to pass), and finally using the Web Request action with the Copy.asmx web service and the CopyIntoItems method (to copy the document to the subsite library).

In your case, you could use this method in a workflow on the document to copy it down to the subsite and then use the Delete Item action to delete the current document.

Userlevel 7
Badge +17

Eric, but the "Office 365 Upload a document" works even across tenants.. Imho this is the solution here.

Userlevel 5
Badge +13

It's the "Copy Document" that only works within the same site.  Are you talking about the "Office 365 Upload File" action?  I do not see the "Office 365 Upload a document" action.

Userlevel 7
Badge +17

Yes. Exactly that one. I have no computer in front of me and I misspelled it

Regards, Tomasz

Userlevel 7
Badge +17

‌ have you solved your issue? Did our answers helped you? If so - can you mark any of them as "Correct"?

Regards,

Tomasz

Badge +2

When am trying to use Office 365 upload file action, I am able to copy the file from current site library to another sub site library. But my requirement is Am running my workflow in root site and i need to upload the document to parent site library from sub site library. It is not able to read the sub site library file to upload in the parent site library. It is giving an error that "An exception occurred while processing parameter [InputFileToUpload]".  Source URL i tried giving by '/subsitename/subsitelibname/filename.docx' and 'https://siteurl/subsitename/subsitelibname/filename.docx'. Both did not worked. 

Badge +2

‌ Do you have any idea on this.

Userlevel 7
Badge +17

In a such case, so if you want to move a document from elsewhere = not related to a location where your workflow runs, I'd think only about using SharePoint REST API.

Badge +2

 Thank you for your response. Yes, I tried using rest api as well. Rest API has moveto and copyto methods to move the documents from one document library to another library. But this will execute only when we are moving the files with in the site not across the sites.

Reply