web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How do I loop my flow,...
Power Automate
Unanswered

How do I loop my flow, until all my files are moved?

(1) ShareShare
ReportReport
Posted on by 2

My flow only moves 20 files MAX, how do I revise this flow, so it runs until all files are moved?

 

Screenshot_2-7-2024_141018_make.powerautomate.com.jpeg

Categories:
  • David_MA Profile Picture
    15,627 Super User 2026 Season 2 on at

    Is the 20 files some limitation? I don't do much with OneDrive. If it is, I think this may work for you:

    1. Create a Boolean variable and set the default to false, which you can name Completed.
    2. Add a Do until action to your flow and set it to run until the variable Completed is true.
    3. Move the list items in folder and For each actions inside the Do until. 
    4. After the list items in folder action, add a condition. On the left side, use a length expression and convert it to an integer to find how many items are returned from the list items in a folder action. Then set the condition to where the expression is greater than zero (0).
    5. Put the For each action on the yes side of the condition.
    6. On the no side of the condition, add a set variable action and set Completed to true.
    7. I am not sure you will need to do this to prevent errors, but you may need to set the List files in folder action to limit it to 20 items.

    This way, the do until action will process 20 files at a time until it finds no more files in the folder to move.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 308 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 159

Last 30 days Overall leaderboard