Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
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

 

  • lbendlin Profile Picture
    7,794 Super User 2025 Season 1 on at
    Re: Flow to delete files in a folder running successfully but not working

    not sure what else to try. If you have a support plan you can consider opening a ticket with Microsoft.

  • BrigitteL Profile Picture
    21 on at
    Re: Flow to delete files in a folder running successfully but not working

    Yes, I can manually delete them

  • lbendlin Profile Picture
    7,794 Super User 2025 Season 1 on at
    Re: Flow to delete files in a folder running successfully but not working

    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
    Re: Flow to delete files in a folder running successfully but not working

    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
    7,794 Super User 2025 Season 1 on at
    Re: Flow to delete files in a folder running successfully but not working

    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
    Re: Flow to delete files in a folder running successfully but not working

    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
    7,794 Super User 2025 Season 1 on at
    Re: Flow to delete files in a folder running successfully but not working

    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?

     

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow