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

move files with a condition

I have the flow below but now it moves all the files.
Only the files that start with processed may be moved.
and .... if there are any files that do not have a processed name, another mail must be sent.

How do I solve that?

 

 

flow2.png

10 REPLIES 10
Community Support Team
Community Support Team

Re: move files with a condition

Hi @frixel ,

 

You could use Filter array to filter files whose file names begin with processed.

Then use length() function to get the number of files that meet the criteria.

If the result is greater than 0, the eligible file is moved to the specified folder; if the result is equal to 0, the message is sent.

 

Image reference:36.PNG

 

Please take a try.

 

Best Regards,

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.
frixel
Level: Powered On

Re: move files with a condition

Thanks for your reply but i have a error.

i can`t  get it in there.

 

flow.png

Community Support Team
Community Support Team

Re: move files with a condition

Hi @frixel ,

 

Please click Edit in advanced mode.

 

Image reference:

 

45.PNG46.PNG

 

Best Regards,

 

 

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.
frixel
Level: Powered On

Re: move files with a condition

error but i don`t no why.

 

flow3.png

 

flow4.png

Community Support Team
Community Support Team

Re: move files with a condition

Hi @frixel ,

 

Please use item()['Id'] instead of item()['ID'].

 

Regards,

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.
frixel
Level: Powered On

Re: move files with a condition

I keep getting an error message. I have adjusted the item()['ID'] to item()['id']

 

flow5.png

Community Support Team
Community Support Team

Re: move files with a condition

Hi @frixel ,

 

Please configure Move or rename a file action in Apply to each.

 

Image reference:

11.PNG

 

Regards,

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.
frixel
Level: Powered On

Re: move files with a condition

oke, i understand and the flow runs.

But just 1 file and not al the files in the folder :-(

Community Support Team
Community Support Team

Re: move files with a condition

Hi @frixel ,

 

That's related to the logic of Condition you configured, or that there is only one file in your Folder that matches the expectations.

 

The logic of the Flow configuration is no problem.

 

Regards,

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.
frixel
Level: Powered On

Re: move files with a condition

oke, thank you. but what must i changed so all the files in that folder must be replaced?

the other files now wil be leave in there.also when the the flow runs again.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand 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: 407 members 4,532 guests
Please welcome our newest community members: