web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard