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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Filter SharePoint fold...
Power Automate
Answered

Filter SharePoint folders containing specific string

(0) ShareShare
ReportReport
Posted on by 10

Hi, 

is it possible to select only folders on Sharepoint and that only folder are selected, that contain a specific string, e.g. foldername is "20240101 Example" and it should be selected and then deleted if it contains "2024".

 

Many thanks in advance!

Categories:
I have the same question (0)
  • Verified answer
    v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @actuallyba ,

    I did a test for your reference.

    In my scenario:

    vyetonggumsft_0-1708594889979.png

    vyetonggumsft_1-1708596080082.png

     

    @and(equals(item()?['{Path}'],'libraryname/'),equals(item()?['{IsFolder}'],true),contains(item()?['{Name}'], string(2024)))
    length(body('Filter_array'))
    items('Apply_to_each')['ID']

     

    Best Regards,

    Sunshine Gu

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 250 Super User 2026 Season 1

#2
Expiscornovus Profile Picture

Expiscornovus 222 Most Valuable Professional

#3
Haque Profile Picture

Haque 174

Last 30 days Overall leaderboard