cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

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
Highlighted
Community Support
Community Support

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.
Post Prodigy
Post Prodigy

Re: move files with a condition

Thanks for your reply but i have a error.

i can`t  get it in there.

 

flow.png

Highlighted
Community Support
Community Support

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.
Highlighted
Post Prodigy
Post Prodigy

Re: move files with a condition

error but i don`t no why.

 

flow3.png

 

flow4.png

Highlighted
Community Support
Community Support

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.
Highlighted
Post Prodigy
Post Prodigy

Re: move files with a condition

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

 

flow5.png

Highlighted
Community Support
Community Support

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.
Highlighted
Post Prodigy
Post Prodigy

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 😞

Highlighted
Community Support
Community Support

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.
Highlighted
Post Prodigy
Post Prodigy

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

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Users online (5,886)