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 / Assistance Needed with...
Power Automate
Unanswered

Assistance Needed with Power Automate Desktop Flow - Excel File Filtering

(0) ShareShare
ReportReport
Posted on by 203

Hi Everyone

 

I need assistance with a Power Automate Desktop flow that involves looping through Excel files obtained from the 'Get Files' folder action. During this process, I want to identify files with names like 'China-12345,' where '12345' is constant. If such a file is encountered, I want the flow to skip opening it and proceed to the next file in the loop. Can you please guide me on how to accomplish this task.

 

Best Regards 

Muzamil Ahmed

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Inside the For each loop that goes through your files (assuming the current file is stored as %CurrentItem%), add a condition that checks if %CurrentFile.NameWithoutExtension% contains (or ends with) "-12345". If it does, use Next loop to skip it.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • Ahmedmuz Profile Picture
    203 on at

    Thanks a million:) If you could share a snap sample it will be a great help for me to understand more please ?

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Here's how you could do it:

    Agnius_0-1690089621661.png

     

    And here's a snippet for the code:

    LOOP FOREACH CurrentItem IN Files
     IF Contains(CurrentItem.NameWithoutExtension, -12345, False) THEN
     NEXT LOOP
     END
    END

     

    But you could also use an "Ends with" operator in the If condition, if the string is expected to always be at the end of the file name:

    Agnius_1-1690089696551.png

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 298 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard