cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Pringle
New Member

Automated Flow to delete duplicate files in a SharePoint folder

I currently have an Automated Flow set up to take attachments from a shared mailbox and save them to a SharePoint folder location.

 

Overtime I build up a number of duplicate files and am now keen to explore if anyone can suggest a Flow to Automate the deletion of duplicate files from this SharePoint Folder destination.

 

Any help or guidance greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @Pringle ,

 

You could consider judging whether the existing file names and attachment names in the folder are equal to filter duplicate files.

  1. Use List folder action to get the files in the specified folder. Configure the Filter array to filter the files that meet the conditions.
  2. If duplicate files exist, delete the file and create a new file.

Image reference:

2.PNG3.PNG

 

Best Regards,

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

View solution in original post

2 REPLIES 2
v-bacao-msft
Community Support
Community Support

 

Hi @Pringle ,

 

You could consider judging whether the existing file names and attachment names in the folder are equal to filter duplicate files.

  1. Use List folder action to get the files in the specified folder. Configure the Filter array to filter the files that meet the conditions.
  2. If duplicate files exist, delete the file and create a new file.

Image reference:

2.PNG3.PNG

 

Best Regards,

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

Hi, 

Could you inform all the steps of the flow? I tried to do as screenshot, but I am not getting success.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (2,565)