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.
Highlighted
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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (7,009)