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 Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (6,344)