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 / Delete Folder created ...
Power Automate
Unanswered

Delete Folder created by users in a SharePoint MetaData based structure

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello, I am totally new with the advanced functions of SharePoints. After some time of "Dropbox-alike" structure, an employee accidentaly deleted ALL files into a very important folder she also should not have benne able to acces (and apparently, by mistake another employee shared it with her). So now I've changed whole structure based on subsites, metadata and columns, thus willing to block any upload that is not files (deleting folders on upload/creation). I have tried to find a clear guide, but I could not find anything.

I am stuck in the beginning, straight after dropping the line with the subsite url. Should I put "Delete element" next or first I'd better add a control on file type? And what should looks like the syntax? Thanks

Categories:
I have the same question (0)
  • v-yuazh-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    Could you please explain more details about your isse and your requirement?

    Please explain more details so we would try to provide a proper workaround for you.

     

    Best regards,

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Sure thing.
    As I've created a structure based on metadata and not anymore on classic folder storage, I now need to block the team members to upload entire folders into SharePoint site. The current upload menu shows "File", "Folders","Model". I'd need to have only File as available options. As I've read this is not possible through permissions, I thought the only solutions would be to create a flow where, on Folder upload, it automatically delete the file and send the uploader a notification. This is very I'm stuck, creating the flow. Of course, I'm very open to any other possible options.

    One thing: Mac user here so no SharePoint Designer. Thanks.

  • v-yuazh-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    You could refer to screenshot below to create the flow to delete the files in the folder, however, the flow could only delete the files in the folder, it couldn't delete the folder, delete a folder in sharepoint library is not supported in microsoft flow currently:

    Capture.PNG

    Capture.PNG

     

    The expression in the Condition as below:

    @equals(triggerBody()?['{IsFolder}'], true)

    The expression in the Condition 2 as below:

    @and(startsWith(items('Apply_to_each')?['{Link}'], triggerBody()?['{Link}']),not(equals(items('Apply_to_each')?['{IsFolder}'], true)))

    The flow would run successfully as below:

    Capture.PNG

     

     

    Best regards,

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you @v-yuazh-msft for you prompt reply and the very detailed response. Unfortunately, cannot accept this as a solutions, since Folders are the issue, not files. Other than a Flow, you confirm there is no other way to (at least) remove the option for Folder uploading in the menu? Thanks.

  • v-yuazh-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    There is no any way to delete a folder in sharepoint library with sharepoint connector currently.

    Maybe you could take a try with the "Move folder" action or take a try with http to achieve your needs.

     

    Best regards,

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 124 Super User 2026 Season 1

#2
Ellis Karim Profile Picture

Ellis Karim 52 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 50

Last 30 days Overall leaderboard