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 / Flow to delete files i...
Power Automate
Unanswered

Flow to delete files in a folder running successfully but not working

(0) ShareShare
ReportReport
Posted on by 21

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

 

BrigitteL_0-1698415113897.png

BrigitteL_1-1698415169570.png

 

Categories:
  • lbendlin Profile Picture
    8,726 Super User 2026 Season 1 on at

    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?

     

     

  • BrigitteL Profile Picture
    21 on at

    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.

  • lbendlin Profile Picture
    8,726 Super User 2026 Season 1 on at

    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.

  • BrigitteL Profile Picture
    21 on at

    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?

     

    BrigitteL_0-1698429543351.png

     

  • lbendlin Profile Picture
    8,726 Super User 2026 Season 1 on at

    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?

  • BrigitteL Profile Picture
    21 on at

    Yes, I can manually delete them

  • lbendlin Profile Picture
    8,726 Super User 2026 Season 1 on at

    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.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 245 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 233 Super User 2026 Season 2

#3
Valantis Profile Picture

Valantis 136 Super User 2026 Season 2

Last 30 days Overall leaderboard