cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
marial16
Post Partisan
Post Partisan

Delete Sub folder from SP doc library

When an item is deleted from a SharePoint list, I want to be able to delete the subfolder that I have created in a document Library, in order to store the attachments related to this item.

Every time a user uploads an attachment (from powerapps), a subfolder is created in a doc library that contains the attachment.

How can I delete the subfolder?

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @marial16,

 

You could use the Delete item action to delete the subfolder, actually, you could consider the library as a SharePoint list, each file and folder is an item stored in the SharePoint list. Please refer to the following steps:

Annotation 2020-05-20 103033.jpg

 

Annotation 2020-05-20 103052.jpg

 

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

View solution in original post

3 REPLIES 3
ChristianAbata
Super User
Super User

hi @marial16  by using default actions the are no way to do that but you can use API to delete folders instead see the doc https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-folders-and-files-with-rest and see my video to know how can you use api from office 365 https://www.youtube.com/watch?v=eSwdxAJQmJU&t=1s

 

I hope this can helps.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
v-litu-msft
Community Support
Community Support

Hi @marial16,

 

You could use the Delete item action to delete the subfolder, actually, you could consider the library as a SharePoint list, each file and folder is an item stored in the SharePoint list. Please refer to the following steps:

Annotation 2020-05-20 103033.jpg

 

Annotation 2020-05-20 103052.jpg

 

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

guna_win13
Resolver I
Resolver I

@marial16 - is it complete this Task

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,094)