logo
search
Others

How to Create a Power Automate Flow to Move Matching SharePoint Files

Maira MehtabMaira Mehtab Sep 22, 2026 869 views

Question details

The user needs a Power Automate workflow that triggers when a document is saved in SharePoint Folder A, searches for a file with a similar name in Folder B, and moves the matched file into Folder C.

Product
Power Automate and SharePoint
Device & OS
not provided
Scenario
Automating document organization and dynamic file movement across multiple SharePoint directories based on file name matching.
Observed behavior
Requires designing specific workflow logic utilizing SharePoint file triggers, name matching queries, and the Move file action.
Before you start

Ensure you have an active Microsoft 365 subscription with Power Automate access, and verify that you possess Edit or Owner permissions for all involved SharePoint folders (Folders A, B, and C).

Solution 1Recommended

Design the Power Automate Flow Logic

Use a combination of SharePoint triggers, file listing actions, and conditions to identify and move matching files. Advanced scenarios may require specialized community support.

To achieve this automated routing, you will need to string together several SharePoint connectors in Power Automate. The core logic involves triggering the flow upon a new file creation, querying the second folder for a matching name, and executing the move action if a match is found.

1
Create an automated cloud flow

Go to Power Automate, select 'Create' from the left sidebar, and choose 'Automated cloud flow'. Give your flow a name and select the SharePoint trigger 'When a file is created (properties only)'.

2
Configure the trigger for Folder A

In the trigger action, select your SharePoint Site Address and specify 'Folder A' as the Library Name or Folder path where the initial document will be saved.

3
Retrieve files from Folder B

Click 'New step', search for 'Get files (properties only)', and add it. Set the Site Address and specify 'Folder B'. Use the Filter Query field to match the file name dynamically (e.g., typing FileLeafRef eq 'TriggerFileName').

4
Add a condition to check for matches

Click 'New step' and add a 'Condition' control. Set the condition to check if the length of the retrieved files array from Folder B is greater than 0. This ensures a matching file actually exists before attempting to move it.

5
Move the matched file to Folder C

Inside the 'If yes' branch of your condition, add the SharePoint 'Move file' action. Use the dynamic content 'Identifier' from the 'Get files' action for the File to Move, and set the Destination File Path to 'Folder C'.

Advanced Troubleshooting: Because naming conventions and SharePoint metadata can complicate matching logic (e.g., partial matches or extension differences), it is highly recommended to post your specific scenario in the Microsoft Power Platform Community for specialized workflow assistance.
Free Microsoft Office alternative

Looking for a Reliable Alternative to Manage Your Documents?

If you find Microsoft Office and its automation tools overly complex or expensive, WPS Office offers a free, lightweight, and highly compatible alternative. You can seamlessly manage your Word, Excel, and PowerPoint files with an intuitive, all-in-one interface.

  1. 1. Download the installer: Visit the official WPS Office website and download the free installation package for your operating system.
  2. 2. Install the software: Run the downloaded installer and follow the simple on-screen prompts to complete the setup in just a few minutes.
  3. 3. Open and manage files: Launch WPS Office and easily drag and drop your existing Microsoft Office files into the workspace to start editing without formatting loss.
Fully compatible with Microsoft Office formats (DOCX, XLSX, PPTX).Free to use with a familiar, easy-to-navigate user interface.Lightweight installation that runs smoothly on Windows, Mac, and Linux.Built-in PDF editing tools for comprehensive document management.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my Power Automate flow failing to find the matching file in SharePoint?

This usually happens if the Filter Query syntax is incorrect, if the file extensions do not match exactly, or if the flow lacks the appropriate permissions to read Folder B. Ensure your dynamic content correctly represents the file name without hidden characters or extra spaces.

Can I copy the file instead of moving it using Power Automate?

Yes. Instead of using the 'Move file' action in your condition branch, you can select the 'Copy file' action. This will leave the original file intact in Folder B and create a duplicate version in Folder C.

Where can I get specialized help for Power Automate flow errors?

The best place to get expert assistance for complex logic, syntax expressions, and advanced SharePoint integration is the official Microsoft Power Platform Community forums.