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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Microsoft Flow: Get fi...
Power Automate
Unanswered

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

 

 

 

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

    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

  • Gangula Profile Picture
    77 on at

    @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

     

     

     

     

     

     

     

  • BTbearings Profile Picture
    46 on at

    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.

  • lk777 Profile Picture
    124 on at
    @BTbearings,
    Top count: 5000
    Do not trust that "(default=all)"
  • Divya Profile Picture
    3 on at

    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!

  • BTbearings Profile Picture
    46 on at

    That totally fixed it!!  Thanks!

  • Community Power Platform Member Profile Picture
    on at

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

  • amita2022 Profile Picture
    4 on at

    Very helpful flow

  • MarkBarton Profile Picture
    3 on at

    Thank You!!!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard