Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Recursive delete folder in sharepoint with MS Flow

(0) ShareShare
ReportReport
Posted on by

Currently, I am trying to delete a folder that is not empty in sharepoint, in a shared library, I have been looking at other possible solutions in this forum, but none has worked for me, as it was using the activity to delete files or items, and it has not worked in my sharepoint. I have seen that the folder could be deleted via http, with the DELETE method and with the URI _api/web/GetFolderByServerRelativeUrl('Folder') but I get a 400 error.
Another option that I have done is to use the POST method and pass in the header the parameter "X-HTTP-Method": "DELETE", but it didn't work either.
Any other idea that I can try?

 

Best

  • Suggested answer
    CU03091917-0 Profile Picture
    CU03091917-0 26 on at
    Recursive delete folder in sharepoint with MS Flow
    Yet another half-fast, incomplete answer.  Does anyone have a clear, concise how-to on Sharepoint folder deletion?  Is there a way to turn off checking for items in the folder before deleting so it will work like its supposed to?
  • SudeepGhatakNZ Profile Picture
    SudeepGhatakNZ 14,231 on at
    Re: Recursive delete folder in sharepoint with MS Flow

    You need to provide the relative url to the folder. Just the folder name wouldn't work.

    _api/web/GetFolderByServerRelativeUrl('/sites/YourSiteName/YourDocumentLibraryName/FolderName')

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard