I am investigating for a possibility for SharePoint Online to automatically and dynamically move files into specific folder.

We have a folder on a SharePoint library where files were exported into from another source. These files are labelled with account number and date of the report. On the other side of things, each of these accounts have a folder on SharePoint with the account number as a folder name within the same SharePoint site. Is it possible for SharePoint (SharePoint Online) to automatically move these files into corresponding folders?

I am thinking about SharePoint Workflows, but SharePoint Designer doesn't seem to have an "out of the box" solution, or perhaps I am missing something.

Can someone help? Many thanks.

2 Answers 2


You can try using MS flow which has inbuilt Activity to move files from one document Library to Another or in Same document Library with different Folder.

Here is the refrence Article https://powerusers.microsoft.com/t5/Building-Flows/Simply-want-to-move-a-file-from-one-folder-in-sharepoint-to/td-p/15564

  • Thanks for this. Unfortunately my scenario is a little bit more complicated than that. A file name says "10000001 181213.pdf (where 10000001 is the account number) needs to be moved from a temporary SharePoint folder into a folder called 10000001. Another file calls 10000002 181213.pdf then needs to be moved to the 10000002 folder, and so on. In the other words, SharePoint needs to be able to recognise the file name (or Metadata), then move to the corresponding folder with the same account number.
    – Joe
    Dec 13, 2018 at 14:54
  • Those calculation and manipulation of folder url you can make in flows with string operation. You should give a try Dec 13, 2018 at 15:13
  • We cannot consider Microsoft Flow at the moment, partly because its functionalities are limited and do not match SharePoint Workflows. Also, Microsoft Flow cannot even see the SharePoint site we want to connect. It keeps saying it cannot find the site address. I can see it is there, of course.
    – Joe
    Dec 14, 2018 at 8:35

While SPD workflows does not have an action to move a file you can do it indirectly by using the REST API from the workflow.

A few years back I've created a similar solution for a client this way.

The endpoint you want to use is this:

_api/web/folders/GetByUrl('Original Document Location')/Files/getbyurl('Test.pdf')/CopyTo(strNewUrl='/sites/Meetingsite/DocumentNewLocation/Test.pdf',bOverWrite=true)

Venturing into the whole 'call the rest api from a workflow' can be somewhat daunting at first, but it's actually not that bad - and by now theres quite a few ressources to be found online to help you out.

Here's a guide to get you started: http://www.benprins.net/2017/05/01/sharepoint-2013-workflow-copy-files-with-rest-api/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.