Move file to subsite

Has anyone figured out on how to move a file to a sub site with just the out of the box actions?

I am busy looking at the Call action to use Rest, but no lock s

May 21st, 2015 1:34am

In Site Settings, there is a link under Site Administration heading called "Content and structure".  This gives you a tree view where yuou can move and copy files to other locations.
Free Windows Admin Tool Kit Click here and download it now
May 21st, 2015 2:25am

I assume, moving it automatically...

Since you mentioned it, here's a good example of moving a file via a workflow leveraging the REST API

May 21st, 2015 2:30am

Hi Margiet,

That is correct. It needs to happen in a SharePoint 2013 Workflow.

Did you forget to post the link?

Free Windows Admin Tool Kit Click here and download it now
May 21st, 2015 3:27am

Hi Michele,
You can do it via custom actions:

Please have a look at below links:
http://experiencesharepoint.blogspot.com/2013/04/custom-workflow-action-to-move- file.html

http://sharepoint.stackexchange.com/questions/92078/custom-action-to-move-bulk-document-from-one-library-to-another

https://plumsail.com/blog/2014/06/how-to-move-documents-using-workflow-in-sharepoint-2013-and-office-365/

May 21st, 2015 4:48am

Yes, this was the one I intended to post: http://www.office365tipoftheday.com/2013/12/31/sharepoint-designer-workflow-move-document-with-rest-api/
Free Windows Admin Tool Kit Click here and download it now
May 21st, 2015 5:56am

Thank you Margariet,

So if I have Site A "Docs" with document library A => http://sp.contoso.com/docs/A/somefile.pdf, what will the URL for the Rest Call have to be to move it to Site B that is a subsite of Site A "Hold" with document library B => http://sp.contoso.com/docs/Hold/B/somefile.pdf 

This is what I have been struggling with and if I see "Bad Request" in the workflow Rest API response I am going to cry or scream, still deciding about which one.

I have been ab;e to create sites, lists and libraries with the Rest Calls in 2013 workflows, but this has me stumped.

@Sachchin,

Thank for the advise, but the solution has to be 99% OOTB.
If it wasn't for that I would have solved this a week ago.

May 21st, 2015 12:27pm

Hi Michle,

If you want to move document http://sp.contoso.com/docs/A/somefile.pdf to http://sp.contoso.com/docs/Hold/B/somefile.pdf, then you can use the REST URL like this: http://sp.contoso.com/_api/web/lists/GetById(guid'{ListId of library A}')/Items({ItemID of somefile.pdf})/File/MoveTo(newUrl=' http://sp.contoso.com/docs/Hold/B ',flags='1').

You can follow the steps in the link provided by Margariet to configure the 2013 workflow for moving documents.

You can also do as Dyung said, use Content and Structure to move the documents to the place where you need within the site collection.

http://mroffice365.com/2013/05/sharepoint-2013-manage-content-and-structure/

Thanks,

Victoria

Free Windows Admin Tool Kit Click here and download it now
May 22nd, 2015 2:31am

Hi Victoria,

I tried with a "HTTP POST" call to:

http://unidev/_api/web/lists/GetById(guid'856bd3ba-7a70-4eaa-9ea7-6610d038e390')/Items(10)/File/MoveTo(newUrl='http://unidev/sheq/Uploaded',flags='1')

But my ResponseCode is just "BadRequest"

This is where I have been stuck from day 1

 

May 25th, 2015 8:40am

Hi Michle,

Please change the URL as below shows:

http://unidev/_api/web/lists/GetById('856bd3ba-7a70-4eaa-9ea7-6610d038e390')/Items(10)/File/MoveTo(newUrl='/sheq/Uploaded/filename.docx',flags='1')

Remove the guid and modify the newUrl parameter to the relative url of the file.

Thanks,

Victoria

Free Windows Admin Tool Kit Click here and download it now
May 25th, 2015 10:00pm

Hi Victoria,

This issue is starting to make me feel like this is not possible.

Here are some screenshots.

May 26th, 2015 3:46am

Hi Michle,

As my test, the MoveTo function can only move documents at the same site level.

As a workaround, I tested with 2010 workflow platform and use Send Document to Repository action to move the document to the subsite's drop off library and then the documents will be moved to corresponding library based on the pre-defined content organizer rules.

http://www.documentmanagementworkflowinfo.com/sharepoint-2013/sharepoint-workflow-move-document-records-center.htm

Thanks,

Vcitoria

Free Windows Admin Tool Kit Click here and download it now
May 26th, 2015 9:31pm

Hi Michle,

As my test, the MoveTo function can only move documents at the same site level.

As a workaround, I tested with 2010 workflow platform and use Send Document to Repository action to move the document to the subsite's drop off library and then the documents will be moved to corresponding library based on the pre-defined content organizer rules.

http://www.documentmanagementworkflowinfo.com/sharepoint-2013/sharepoint-workflow-move-document-records-center.htm

Thanks,

Victoria

May 26th, 2015 9:32pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics