web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Can anyone work out ho...
Power Automate
Unanswered

Can anyone work out how to sync 2 folders in 2 SharePoint sites but where the files in each site have different extensions?

(0) ShareShare
ReportReport
Posted on by 2

Hi all,

 

I'm new to power automate - spent the last 10 years being a total Linux fanboy so use terminal and scripts for a lot of jobs on my own PCs - but now thanks to a new job I've been forced to relearn / learn all the Microsoft systems again.

 

We use Office 365 a lot and have power automate as part of our licenses so therefore have decided to attempt to utilise it since it's already there for us to use.

 

Our school has an insane amount of policies and we are currently attempting to get all of them updated and up to scratch following a change of senior management.

 

The idea is that we have two SharePoint teams/libraries for administration files. One that's only accessible to senior management and the admin team. One that all staff can access.

 

I've successfully managed to create a flow - after spending loads of time trawling this site, thanks guys - that creates, from a word version of the policy in the private team, a pdf copy in the public team when the file is published as a major version.

 

(The whole point of the PDF version in the public library is to prevent other staff member's from messing up formatting and  content, accidentally deleting the files - settings in the public folder are set to prevent anyone from deleting the file - while also getting rid of the labour intensive task of manually converting and replacing the file every time an adjustment is made, simultaneously also putting it in a format ready to be released to the general public - parents/guardians/Ofsted/website/etc)

 

But I've got really stumped when trying to implement the correct flow to delete the pdf version when the word file is deleted.

 

I've seen many examples of people syncing two folders to share the same files where the file name and extension both match but can't find an answer to my dilemma.

 

Does anyone know if this is even possible?

Categories:
I have the same question (0)
  • Unknown geen idee Profile Picture
    1,757 on at

    Dear Tmeadows,

     

    I am not familiar with the sync solution you are referring to ... doubt it would work with basically different files (word and pdf). But why not go for a relative simple solution:

    1. When you delete a word file on sharepoint 1, take the filename and trim this to remove the extention. Sometimes the filename without extention is already available as an output element from for example a 'List files in folder' action ... and if not, use an expression split() or something similar. 
    2. Action: List files in folder on Sharepoint 2.
    3. Action: Filter array on output from previous point. Filter condition is 'Filename contains 'Filename without extention' from the previous action. 

    If action 3 has any result, this means that there are files on Sharepoint 2 which should likely be deleted. You can either delete these directly or maybe have some approval step in between to check if this file should really be deleted.

     

    Anyway, hope the suggestion helps,

    Happy flowing,

    Koen

     

  • tmeadows Profile Picture
    2 on at

    Hi Koen,

     

    Thanks for your reply, I had a very brief chance to play around last night - before site management kicked me out - and your post really helped me out, although the actions I used were slightly different to those which you had stated, I was at least able to test a flow that successfully managed to isolate the file name without the extension.

     

    I'm going to persist with the idea as I'm sure I have most of the knowledge now to actually get it running as intended.

     

    I'll be sure to post the flow once I've worked the rest out in case it's of use to anyone else out there.

     

    Tmeadows

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard