Announcements
Hi all,
I've set up a scheduled flow to run each day and delete all the files within a folder.
The flow runs successfully, but doesn't delete the files in the folder specified. Would anyone know what's wrong in the below?
Thanks in advance
If you look at the flow run history, and the raw output for one of the delete actions - do you see any message that could hint at missing permissions or something?
Or maybe it is a timing issue?
Thanks for your response @lbendlin.
I checked the raw output of the Get Files step and there are a few thousands of code which I don't quite understand. However, in that raw output I recognise quite a few paths very close to the one I'm looking into, but the specific one is not there. Also, as the Get Files step refers to a location that has got many folders, I would have expected to see them all in the raw output, but they are not.
I have even turned the pagination on for Get files but doesn't seem to make any difference.
Ah, that may be a clue. Unless you take special action these flows will be limited to a handful of items. Most likely your flow only ran through the first 100 files.
In the Get items step you can add OData filters to focus on just the folder you want and maybe even just the file type you want.
Thanks @lbendlin.
I've now done some changes and the raw input of the filter step correctly shows the files I need to delete in the target location. However from the run history I see that the output of the filter step is empty.
How is this possible when the input is correct, the filter now now only has "Value" - so in theory it should just take those correct files- and yet the output is empty?
check the flow history again - are you sure the flow user has permission to delete these files? (if that is you - can you try and manually delete one of them?
Yes, I can manually delete them
not sure what else to try. If you have a support plan you can consider opening a ticket with Microsoft.
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
David_MA 245 Super User 2026 Season 2
11manish 233 Super User 2026 Season 2
Valantis 136 Super User 2026 Season 2