Hi @CU08031624-0,
I would take the follwoing steps:
1. Instead of moving entire folders at once, iterate through files and subfolders separately with controlled loops and smaller batches.
2. Use Delay actions or limit concurrency in loops to avoid overwhelming SharePoint or hitting throttling.
3. Copy + Delete: Copy files to the destination, then delete source files and folders explicitly. For more control and better error handling.
4. After moving files, use SharePoint REST API calls or the "Delete file/folder" action to remove empty folders.
5. Use separate flows for moving files and cleaning up folders, triggered sequentially or by events.
The last point (number-5) is very important, to achieve this we can do the followings:
Flow 1: Move Files and Subfolders: Triggered manually or by an event in the source library (e.g., "When an item is created" or scheduled). Responsible for moving all files and subfolders from the source folder to the destination folder. Consider handling iteration over files and subfolders with controlled concurrency and error handling.
Flow 2: Delete Empty Source Folders: Triggered after Flow 1 completes (e.g., via a custom trigger like a status update, a queue item, or a scheduled run). This will recursively delete empty folders left behind in the source location. We can use SharePoint REST API calls or "Delete folder" actions explicitly.
Flow 3 (Optional): Process Files in Destination Library: Triggered automatically by "When a file is created" or "When an item is created" in the destination library. Responsible for any post-move processing or automation that should start once files arrive
I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!