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 Automate
Suggested Answer

count files in mappa

(0) ShareShare
ReportReport
Posted on by 43
Hi,
 
I'm trying to count the number of files within a specific folder. I've found various solutions online, but they all seem to differ, and none of the syntax examples (like %Files.Count%, length.files, etc., where 'files' represents the retrieved files from the folder) are working for me. Could you assist?"
 
I have the same question (0)
  • Suggested answer
    eetuRobo Profile Picture
    4,522 Super User 2026 Season 1 on at
    I recommend you create a new flow with Power Fx not enabled. Seems like you have it enabled. Power Fx and regular PAD flows have very different syntax and most solutions, tutorials and documentation will be for regular flows since Power Fx is still fairly new in Power Automate Desktop.


    Power Fx uses = sign to reference functions or variables. It doesn't recognize the %variable% -syntax.

    Regular flow
    With the regular flow you can get the count easily like so:


    Power Fx flow
    Use CountRows() -function
  • Suggested answer
    Riyaz_riz11 Profile Picture
    4,150 Super User 2026 Season 1 on at
    Hi,
     
    When Power Fx expressions are enabled in Power Automate Desktop, the older %Variable.Property% syntax is replaced by the Power Fx formula language, which behaves more like Excel or Power Apps logic.
     
    Mode Syntax to Count Files Notes
    🟠 Classic PAD mode %Files.Count% Traditional PAD variable syntax
    🟢 Power Fx mode (Fx enabled) CountRows(Files) Uses Power Fx functions
     
     

    How to Know You're in Power Fx Mode:

    • Expression boxes show an fx symbol

    • Variable names don’t use %...%

    • You can use Excel-like functions: If(), CountRows(), First(), Text(), etc.

     

     

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

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 957

#2
Valantis Profile Picture

Valantis 847

#3
Haque Profile Picture

Haque 609

Last 30 days Overall leaderboard