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
not sure what else to try. If you have a support plan you can consider opening a ticket with Microsoft.
Yes, I can manually delete them
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?
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?
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 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.
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?
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional