Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Sync libraries "When an item or file is modified" - search and replace in subfolders

Hi All,

I am trying to build a flow (as you can probably guess):

- Library 1: Master files, in subfolders, modified every once in a while.

- Library 2: Same files, but different folder structure with subfolders and sometimes multiple duplications of the files.

Library 1: When a file is updated, I want it to search through Library 2 and all subfolders and replace the file and all dublications of it with the new version.


I of course started with the easy one, it copies all updates to the destination folder. But I want it to search through the subfolders of the destination folder and replace it there. Is that at all possible? Any ideas would be very much appreciated 🙂


Thank you!


File flow.JPG



Community Support
Community Support

Hi @Annnika,


You could following these steps to approach that:


Screenshot 2020-12-31 175314.jpg


Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for the response!

I have set it up accordingly, but struggle a bit with the "copy file". So in the first steps it takes all information from library 1, but in "copy file" there is no mention of library 2 as destination folder to search through. What am I missing here?


Best regards


Solution Sage
Solution Sage

Hi @Annnika 

Please refer to the below link

Power Automate – How to auto copy or move files in SharePoint Library | Knowledge Share (spknowledge...


Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...

Hello Sudharsan,


thank you! Unfortunately not, the copying works perfectly, but the challenge is that it should not simply copy the file to a certain main destination folder in library 2, but search through library 2 and all it's subfolders to find and replace the file wherever it can be found.


Best regards


Helpful resources

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (4,763)