Last week, I was working on a file migration task when I received a requirement to copy files from a network drive to SharePoint using Power Automate. The challenge was to automate the transfer process so that files from the network drive could be seamlessly moved to a SharePoint document library.
Since Power Automate doesn’t directly support network drives, I used a workaround by utilizing a local gateway and folder actions to access the network drive files. This allowed the automation to copy and upload the files to the desired SharePoint location.
In this tutorial, I will explain how to copy files from the local desktop folder to the SharePoint library and how to copy files from SharePoint to a local drive using Power Automate.
Copy a File From the Local Desktop Folder to the SharePoint library using Power Automate
This example will create a flow that copies the file from the local desktop folder to the SharePoint library.
For this example, I created a SharePoint document library named Source Documents.

Now follow the below steps:
1. Create an automated cloud flow. Give the flow name and select the trigger When a file is created (properties only) from the File system action.

Now change the connection and add a new To provide the below data:
- Connection Name: Name of the connection
- Root Folder: The folder path of the local network drive.
- Authentication type: Windows
- Username: Provide machine name/ Administrator name(personal) or domain/ username (if you do know, in the cmd, type whoami).
- Password: Provide the password
- Gateway: Choose the gateway or install the gateway.

Then, provide the root folder by clicking on the folder icon.

2. Add the ‘Get file content’ action from the File System connector, provide the file path using dynamic content, and click on ‘Show advanced options.’ Then, in the ‘Infer Content Type’ field, select ‘Yes.’

3. I want the file to be created in the SharePoint library. Add the ‘Create File‘ action from the SharePoint Online connector. Then, use dynamic content to provide the site address, folder path, file name, and file content.

Now click on Save and run the Flow manually. Once the flow runs, add a file to the local network drive.

After the flow runs successfully, go to the SharePoint documents library, and you will see the same file successfully copied from the local desktop to SharePoint.

You can copy a file from the local desktop folder to the SharePoint library using Power Automate.
Copy Files from SharePoint to a Local Drive using Power Automate
In the previous example, we saw how to copy a file from the local desktop to SharePoint. Now, I’ll explain how to copy a file from SharePoint to the local desktop using Power Automate.
Now follow the below steps:
1. Create an automated cloud flow. Give the flow name and select the trigger When a file is created (properties only). Also, provide the Site Address and Library Name.

2. Add a Get file content using path action for SharePoint from action and Provide the required parameters:
- Site Address: Select the SharePoint site address from the dropdown where the file exists.
- File Path: Provide the full path from dynamic content for when a file is created.

3. Now, I need to create a file on the local drive, so I added the ‘Create file’ action using the File System connector. Then, I provided the folder path, file name, and file content from the dynamic content.

Now click on Save and run the Flow manually. Once the flow runs, add a file to the SharePoint document library.

After the flow runs successfully, go to the local desktop folder, and you will see that the same file has been successfully copied from SharePoint.

In this tutorial, I explained how to automate file transfers between a local desktop folder and SharePoint using Power Automate and how to copy a file from SharePoint to the local desktop using Power Automate.
Related Power Automate tutorials:
- 3 Various Ways to Copy Files in Power Automate
- Move/Copy Files From OneDrive to SharePoint Using Power Automate
- Create CSV Table From Excel File Using Power Automate
- Delete Files Older than 3 Years from SharePoint Document Library Using Power Automate
- Get Last & First Item ID from SharePoint List in Power Automate

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.