Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 20y0Ct5Cbd4p39EZlGUWc7
Power Automate - Building Flows
Unanswered

Delete files with extension /eml from Sharepoint

Like (0) ShareShare
ReportReport
Posted on 2 May 2024 19:21:16 by 2

Guys, I have a flow to delete some files (with name and extension ) on Sharepoint . But - I have many files with extensions .eml (e-mails) that cannot be detected/deleted . See attached. It works for all other extensions (like ZIP , PDF) but does not work for .eml.

Any ideas?

 

Screenshot 2024-05-02 at 20.18.16.pngScreenshot 2024-05-02 at 20.17.41.pngScreenshot 2024-05-02 at 20.17.05.pngScreenshot 2024-05-02 at 20.20.10.png

 

Thanks 

  • creativeopinion Profile Picture
    10,406 Super User 2025 Season 1 on 02 May 2024 at 21:13:36
    Re: Delete files with extension /eml from Sharepoint

    @kmilarov Tested it on my end and it works. Depending on how many files you have in your document library—you may need to toggle on pagination and set a threshold.

    creativeopinion_0-1714684379182.png

    creativeopinion_1-1714684406476.png

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

     

  • kmilarov Profile Picture
    2 on 02 May 2024 at 21:11:34
    Re: Delete files with extension /eml from Sharepoint

    Thank you. I created new folder with 2 files .eml only - and the same result. I think it is because of the file is e-mail (.eml). Any other extensions works perfectly fine. Maybe Sharepoint/Power Automate doe snot consider .eml as a file ?

  • creativeopinion Profile Picture
    10,406 Super User 2025 Season 1 on 02 May 2024 at 20:55:06
    Re: Delete files with extension /eml from Sharepoint

    @kmilarov Check out this YT tutorial: Microsoft Copilot Built a Flow that DELETES ALL PDF Files—it didn't work...

     

    Although I cover how to filter out PDF files in this tutorial—you can use the same concepts covered in this tutorial in your flow. The way you've set up your flow currently is inefficient—especially if you have a lot of files in your document library.

     

    I asked Microsoft Copilot to build me a flow that deletes all PDF files from a document library. After a few additional prompts it gave me an okay flow—however it’s inefficient. In this Power Automate tutorial, I’m going to break down this flow that Copilot has built and show you how you can make it more efficient.

     

    IN THIS VIDEO:

    âś… How to use copilot to build a Power Automate flow

    âś… How to create a flow that deletes a specific file type

    âś… How to build an efficient flow

    âś… How to identify inefficiencies in your Power Automate flow

    âś… How to return files only when using the Get Files (properties only) action

    âś… How to create a Flat View in SharePoint

    âś… How to use a Filter Array action to filter out files by file type

    âś… How to use the Condition action

    âś… How to use the Delete files action

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started