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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Delete existing files of a certain file type from a SharePoint folder

(0) ShareShare
ReportReport
Posted on by 4

Hello,

 

I would like to create a flow to delete all .lnk filetype files from a SharePoint folder.

 

This is what I've made so far, but it doesn't work:

sw9_0-1678203512933.png

 

Many Thanks.

 

I have the same question (0)
  • Kaif_Siddique Profile Picture
    2,104 Super User 2024 Season 1 on at
    Re: Delete existing files of a certain file type from a SharePoint folder

    Hi @sw9 ,

     

    Could you check the File Identifier in Delete File connector? Here is a sample flow.

    Kaif_Siddique_0-1678215949647.png

    Kaif_Siddique_1-1678216033613.png

     

    If I have answered your question, please mark my post as Solved.
    If you like my response, please give it a Thumbs Up.

     

    Regards

    Kaif

  • sw9 Profile Picture
    4 on at
    Re: Delete existing files of a certain file type from a SharePoint folder

    @Kaif_Siddique, thanks, this was previously set to ID rather than Identifier.

     

    However, I have changed this as below and it still doesn't delete the files

    Screenshot 2023-03-08 082718.png

     

    Would appreciate any suggestions how to fix this

  • Verified answer
    v-dezhili-msft Profile Picture
    Microsoft Employee on at
    Re: Delete existing files of a certain file type from a SharePoint folder

    Hi @sw9 ,

     

    Please try:

    substringof('.lnk',FileLeafRef)

    vdezhilimsft_0-1678265198019.png

     

    Best Regards,

    Dezhi

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 655 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 371 Moderator

#3
chiaraalina Profile Picture

chiaraalina 276

Last 30 days Overall leaderboard