cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gangula
Level: Powered On

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

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.

2018-11-15_17-39-52.pngCopy files

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

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

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Community Support Team
Community Support Team

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

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Gangula
Level: Powered On

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. 

 

2018-11-16_18-48-42.pngCopy files from specific folder

 

 

 

 

 

 

 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 210 members 3,185 guests
Please welcome our newest community members: