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 Automate
Answered

File Delete Fail

(0) ShareShare
ReportReport
Posted on by 68

Hi, I am trying to delete files from SharePoint, the process I am using it runs and deletes files but after all files are deleted I am getting a failed message. After the delete I will create new file from outlook attachment but with the fail no additional steps will go forward.

72Zib_0-1632435144717.png

72Zib_1-1632435265453.png

Thanks

Z

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @72Zib 

     

    Could you expand the Delete File step and post  a screenshot of the error you getting?

     

    Thanks

  • 72Zib Profile Picture
    68 on at

    Here is the expended delete step, there was only one file and it looks like it tries 2nd time and that is where it failed

    72Zib_0-1632436239753.png

     

     

     

  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @72Zib 

     

    Thanks for your reply. You mentioned it runs and delete files but I can see it's failed inside the loop. Are you sure its deleting the files? How you mapping the Delete File step? Are you passing the file id?

     

    Thanks

  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @72Zib 

     

    Also for deleting the files you need the identifier? To get the file identifier you need to add Get File Properties action step. This returns the file identifier. Using the Id you should be able to delete the files.

     

    Thanks

  • 72Zib Profile Picture
    68 on at

    Here are the steps:

    in the file identifier / List folder step I input the folder name where the file is located, should i make another step to get Files Properties? Also i did check and the files are removed from the folder. on the screenshot below I did it with 4 files.

    72Zib_0-1632438098925.png

     

     

    72Zib_1-1632438500435.png

     

  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @72Zib 

     

    So why you getting the last error then? Check the run history and compare with List Folder returned data set. It could be something else causing this. Check the List Folder data and its types? Is that all returned the files only. Is contains another folder or something ?

     

    Thanks

  • Verified answer
    abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @72Zib 

     

    I tested this now and replicated the error. In your list folder its returning the files and folders. You can't delete the folder using Delete File step. See below the check I am doing.

     

    image.png

  • 72Zib Profile Picture
    68 on at

    All files in the folder are the same "blank .xlsx" files created in the folder directly from excel online. I do not know how to compare history and with List Folder returned data set. There is no 2nd folder inside this one.

     

    Thanks

  • Suggested answer
    CU18101655-0 Profile Picture
    2 on at
    You have to ignore this error  because this is by design the  list folder fetch hidden folder forms which cannot be deleted and hence we see error  but the flow will proceed with the error to next step and thats were you have to troubleshoot
  • PR-25040755-0 Profile Picture
    53 on at
    Hi @abm abm,

    in condition why do we have to give isFolder = false?
    And i have files only in that folder but I was getting the error in Delete File

    Thank you so much for the solution

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard