I'd love some help as to why my flow is deleting files in a subfolder when it is marked as NO/FALSE in the flow. Any clues?
The issue is that List files in folder returns both files and folders that are contained in that folder - so when you loop over the results, you're deleting both files and folders at the top-level which would effectively delete everything in the folders you deleted.
When you use Get files and Get items in SharePoint, they also return both files/items and folders.
To resolve your issue, there is a property that's also returned for each item called IsFolder which is set to true or false depending on whether it's a folder or file. You can check this property, and only delete the item if IsFolder is false.
----------------------------------------------------------------------
If I've answered your question, please mark the post as Solved.
If you like my response, please consider giving it a Thumbs Up.
But why is it even looking in the subfolder in the first place?
It means your condition always returns Yes.
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492