Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Microsoft Flow: Get files (properties only) of file only in a specific folder

(2) ShareShare
ReportReport
Posted on by 77

I'm trying to copy all the files in a folder(excluding the sub-folders) I have in SharePoint using the "Get files (properties only)" action. I tried to use the "Filter Array" action to filter out the list using the folder path. The filter array is working fine but I'm not able to use that in the Copy file Action. 

 

I have seen a similar question asked before, but that did not have a solution I'm looking for. It had a workaround, but I'm looking for a simpler solution.

Copy filesCopy files

 

 

 

  • MarkBarton Profile Picture
    3 on at
    Re: Microsoft Flow: Get files (properties only) of file only in a specific folder

    Thank You!!!

  • amita2022 Profile Picture
    4 on at
    Re: Microsoft Flow: Get files (properties only) of file only in a specific folder

    Very helpful flow

  • Community Power Platform Member Profile Picture
    on at
    Re: Microsoft Flow: Get files (properties only) of file only in a specific folder

    Exactly right.  Frustrating that it doesn't work as indicated and you have to find a post from @lk777 to figure it out!  Thanks!!

  • BTbearings Profile Picture
    46 on at
    Re: Microsoft Flow: Get files (properties only) of file only in a specific folder

    That totally fixed it!!  Thanks!

  • Divya Profile Picture
    3 on at
    Re: Microsoft Flow: Get files (properties only) of file only in a specific folder

    My flow stopped working because there were more than 100 files in the document library. Changing the top count to 5000 solved my problem!!! Thanks!! Have been trying to figure this out for hours!

  • lk777 Profile Picture
    124 on at
    Re: Microsoft Flow: Get files (properties only) of file only in a specific folder
    @BTbearings,
    Top count: 5000
    Do not trust that "(default=all)"
  • BTbearings Profile Picture
    46 on at
    Re: Microsoft Flow: Get files (properties only) of file only in a specific folder

    I have the same issue, but now I'm running up against the 100 item limit for the SharePoint Get files (properties only) action [edited to correct action name].  If I could filter the items directly in the Get files (properties only) action [edited to correct action name], then I would be fine.  But, if I can't filter by folder path until after the Get files (e.g. by using filter array), than I have no way around the 100 item limit.

     

    If that isn't clear, imagine a big document library with 3000 or so files.  All the files are similar, but I want the 30 or so files in a particular folder.  If there is nothing else unique or identifying about these folders except for their folder path, how could I use flow to get those 30 files?  It seems impossible.

     

    The only option I see is adding some sort of column to the library and seeing if that is filterable in the Get files (properties only) action [edited to correct action name], and use that like a key of some kind.

  • Gangula Profile Picture
    77 on at
    Re: Microsoft Flow: Get files (properties only) of file only in a specific folder

    @v-bacao-msft, Thank you for the reply. Based on your solution I found another way to solve the issue. 

     

    Copy files from specific folderCopy files from specific folder

     

     

     

     

     

     

     

  • Verified answer
    v-bacao-msft Profile Picture
    on at
    Re: Microsoft Flow: Get files (properties only) of file only in a specific folder

    Hi @Gangula,

     

    I did a test on my side, and fields like {Path} seem to be invalid in Filter Query.

    Using Filter array is a good choice, I have configured it based on what you provided.

    In the condition of the Filter query, a judgment is added to check whether the item under this path is a folder. If it is a folder, it needs to be excluded.

    Formula reference:

    @and(equals(item()?['{Path}'], 'Copy/Test123/'),equals(item()?['{IsFolder}'], false))

    Then use items(‘Apply_to_each’)[‘ {Identifier}’] in File to copy field to get the Id of the filtered files, then copy the file to the destination.

    Image reference:

    47.PNG

    Please take a try.

     

    Best Regards,

    Barry

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1