Move files from OneDrive for Business to SharePoint Online

In this SharePoint flow tutorial, let us see how to move files from OneDrive to SharePoint. I will also explain, how to move files from OneDrive to SharePoint using Power Automate.

And also we will learn to copy all files from SharePoint to OneDrive and from OneDrive to SharePoint.

We will also discuss how to move files from OneDrive to SharePoint using PowerShell. Let us learn:

  • Move files from OneDrive to SharePoint
  • Move files from OneDrive to SharePoint using flow or Power Automate
  • Move files from SharePoint to OneDrive
  • Power automate move file from SharePoint to OneDrive
  • Copy all files from SharePoint to OneDrive using power automate
  • Copy all files from Onedrive to SharePoint using power automate

Move files from onedrive to SharePoint

Now, we will learn how to move files and folders from OneDrive to the SharePoint site. When you want to share files and folders with a team of people, you can move files and folders from OneDrive to SharePoint sites.

Without writing any code or without using any 3rd party tool, we can move files from OneDrive to SharePoint by using the modern Office 365 features.

Follow all the steps to move files and folders from OneDrive to SharePoint site.

  • Open OneDrive or you can also click on OneDrive from the Office 365 App Launcher in Office 365.
Move files from onedrive to SharePoint
Move files from onedrive to SharePoint
  • Under My files, Select files or folders to move to the SharePoint site.
  • Then, click on the More option -> Move to.
move to option in OneDrive
move to option in OneDrive
  • Select a SharePoint site. Here it will display the sites that you have access to. Even you can use the Browse Sites link to browse the destination site from Office 365.
copy files from onedrive to sharepoint
Select a SharePoint site in OneDrive
  • Click on Move here. After that, your files and folder are moved from OneDrive to selected SharePoint sites. You can also create a new folder and move the files into that folder. Also, If you have other document libraries, it will display and you can select the destination library where you want to copy or move the files.
move files from onedrive to sharepoint
move files from onedrive to sharepoint

After moving files/folders from OneDrive to SharePoint sites. You will get your files/folders inside Documents in SharePoint sites.

Moved files in documents.
Moved files in documents.

This is how we can move files from onedrive to sharepoint and in the same way, we can copy files from onedrive to sharepoint online document libraries.

Move files from OneDrive to SharePoint using Power Automate

Here we will learn, moving files from OneDrive for Business to SharePoint sites using Power Automate or Microsoft flow.

Follow all the steps to move files from OneDrive to SharePoint sites

  • Open Power Automate (https://flow.microsoft.com)
  • Click on Template
  • In the Search template, search for Move files from OneDrive for business to SharePoint site and select it.
move files from onedrive to sharepoint
move files from onedrive to sharepoint
  • Under the flow will be connected to, add your id. And make sure every step should have a valid connection. Then click on continue.
flow connection
flow connection
  • Once you click on continue, the flow page will open and the first two flows are created for you i.e when a file is created in OneDrive and create a file in SharePoint. Under when a file is created, you just put your Onedrive folder( e.g when you click on the folder icon, here you get an option for the root folder that will be the root folder of your OneDrive Business). Then under create file, choose one SharePoint site address (e.g SP learning), click one folder path where you want to store the moved file in SharePoint(e.g /Shared Documents), type one file name, and select file content from.
  • Under delete file, select a file which one will delete from OneDrive and move to the SharePoint folder.
Move files from OneDrive to SharePoint using Power Automate
Move files from OneDrive to SharePoint using Power Automate
  • After that, you can delete send me a mobile notification trigger and add a new trigger if you want ( e.g if you need mail when a file is moved from OneDrive to SharePoint site.).
move files from onedrive to sharepoint flow
delete a trigger in power automate
  • Click on save. Then you get a notification ‘your flow is ready to go. We recommend you to test it’.
  • Click on the Test icon, here you can test your flow manually and automatically. Select manually then click on Save and test.
  • Then just add a file in one Drive to make the flow work.
  • Once the flow get succeed, you get a succeed status inside My flows -> All runs.
move files from onedrive to sharepoint
move files from onedrive to sharepoint

Move files from SharePoint to OneDrive

Now, let us see how to move files from SharePoint to onedrive. In the same way, we can move folders from SharePoint to OneDrive also.

Follow the steps to learn how to move Files/folders from SharePoint sites to OneDrive.

  • Open your SharePoint sites.
  • In Quick launch, click on Documents.
  • Select files/folders you want to move. Then click on the More option in the command bar.
move files from sharepoint to onedrive
move files from sharepoint to onedrive
  • Click on Move to.
Move to option in SharePoint
Move to option in SharePoint
  • After that, select Your OneDrive.
copying files from sharepoint to onedrive
copying files from sharepoint to onedrive
  • Then click on Move here.
copying files from sharepoint to onedrive
copying files from sharepoint to onedrive

After moving files/folder from SharePoint site it will visible in OneDrive. Below you can see the document is available under My files in OneDrive.

move files from sharepoint to onedrive
move files from sharepoint to onedrive

Move files from SharePoint to OneDrive using Power Automate

Here we will learn to move files from SharePoint to OneDrive using Power automate or flow. There is no template for moving files from SharePoint to OneDrive. You can follow me with the below example.

  • In power automate click on Create.
  • Click on Automated cloud flow.
move files from sharepoint to onedrive
move files from sharepoint to onedrive
  • Type a flow name or else it will be generated automatically. Then under search trigger, search for SharePoint, under that you can see a list of triggers for SharePoint and click on when a file is created.
  • Click on Create.
  • Under When a file is created SharePoint, select your site address, library name, and folder.

copying files from sharepoint to onedrive
file is created in SharePoint site
  • Then add one more action, by clicking on Next Step. Search for get file content using path action for SharePoint in the search box, click on it. Select a site address and file path. Make sure to give file path as Document library name and Filename with extension.
  • To create a file in OneDrive, you can click on the next step and add one more action ( Create a file in OneDrive business). Under Create file, add folder path, file name as a file name with extension, and file content. Then click on Save.
move files from sharepoint to onedrive
move files from sharepoint to onedrive
  • Click On the Test icon and select manually(also you can select automatically). Then click on Test. Add/Upload a file in SharePoint sites(which site address and folder path you have given in flow/ power automate) to run the flow. Once you upload a file the flow gets triggered and the flow gets started.
move files from sharepoint to onedrive using flow
Test flow from SharePoint site to OneDrive
  • Once your test get successful, you can see it in Run history or in My flow.
power automate move file from sharepoint to onedrive
power automate move file from sharepoint to onedrive

Copy all files from the SharePoint site to OneDrive using Power Automate.

Here we will learn to copy all files from the SharePoint site to OneDrive using Instant cloud flow in Power Automate.

Follow all the steps to copy all files from SharePoint to OneDrive.

  • Open Power Automate. Then click on Create.
  • Select instant cloud flow. Type the flow name.
  • Under Choose how to trigger this flow click on Manually trigger a flow(manually triggering a flow with a flow mobile app) and then click on Create.
copy files from SharePoint site to OneDrive
copy files from SharePoint to OneDrive
  • Click on Next step and search get files (properties only)for SharePoint. Type the site address and library name.
  • Then click on the Next step. Under All, click on the control icon. then click on Apply to each(it will loop for each file)
copy all files from SharePoint sites to OneDrive
Apply to each action for files in SharePoint sites
  • Under select an output from the previous step, select value from dynamic content. Then click on, Add an action. Search for get file content using path (SharePoint) and click on it.
copy all files from SharePoint sites to OneDrive
get file content using path
  • Then add site address and file path to get file content.
  • For creating a file in OneDrive for business, click on Add an action. Search for Create file(OneDrive business) and select it.
  • Then type folder path, file name, file content, and then click on save.
copy files from SharePoint to One drive
copy files from SharePoint to One drive
  • Click on the Test icon and select Manually to test manually. Then click on test.
test for copy files from SharePoint to OneDrive.
Test to run the flow
  • Run flow page will come, if you are not signed in then sign in and continue.
Run flow to copy all files from SharePoint to OneDrive.
Run flow to copy all files from SharePoint to OneDrive.
  • After sign in, click on Run flow. Then hit Done(your flow run successfully).
copy all files from SharePoint sites to OneDrive
Flow run Successfully

Note: If you don’t have files in SharePoint then add files in SharePoint, after that you can Run the flow.

Copy all files from OneDrive to SharePoint using Power Automate

Here we will learn to copy files from OneDrive to SharePoint using instant cloud flow in power automate.

Follow all the steps to copy all files from OneDrive to SharePoint.

  • Open Power automate. Then click on create.
  • Click On Instant cloud flow.
  • give a flow name(copy all files from OneDrive to SharePoint) and select manually trigger a flow to trigger a flow. then click on create.
  • Add next step, choose list files in folders(OneDrive Business) from action.
copy files from Onedrive to SharePoint
copy files from Onedrive to SharePoint
  • Add Folder(OneDrive) in List files in folders.
  • Then click on the Next step to add one more flow.
  • Under All, click on the Control icon.
copy files from OneDrive to SharePoint
control loop in Power automate
  • Then under Action, click on Apply to each.
copy files from OneDrive to SharePoint
Apply to each control
  • under Select an output from the previous step, select value from Dynamic content.
  • Click on Add an action, Under Action select get file content using path.
copy files from OneDrive to SharePoint
get file content using path
  • Then add file path(/ name(from dynamic content)).
  • Click on Add an action, select Create file(SharePoint).
  • Then add site address, folder path, file name, and file content from dynamic content.
flow from OneDrive to SharePoint
flow from OneDrive to SharePoint
  • Click on Save. Then click On the test icon and select manually. Click on Test.
  • Then Sign in to run the flow. Once sign-in over, then click on Continue.
  • Click on Run flow. Then hit Done.
copy all files from Onedrive to SharePoint.
flow run successfully

This is how we can move files from SharePoint to OneDrive and in the same way, moving files from SharePoint to OneDrive works. And also we learned how to do it using Power Automate.

After that, we learned to copy all files from SharePoint to OneDrive and OneDrive to SharePoint using Power Automate.

You may like the following flow tutorials:

>