cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
frixel 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
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.
frixel 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

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

Re: move files with a condition

error but i don`t no why.

 

flow3.png

 

flow4.png

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.
frixel 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

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.
frixel 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 😞

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.
frixel 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

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (9,206)