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:
  • abm abm Profile Picture
    33,004 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
    33,004 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
    33,004 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
    33,004 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
    33,004 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
    65 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 308 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 159

Last 30 days Overall leaderboard