
Announcements
Hello, I am searching for a solution for the following scenario. There is a SPO document library with one standard document set. There are about 20 or so document sets in the library. Within each doc set there can be any variety of subfolders or files, files within folders, etc. All that I am trying to do is delete all of the document set contents with a flow without deleting the entire document set. The idea is that the document set will continue to be used and I want to maintain the ID. I've tried the built-in delete file or delete item actions but they are not working for both files and folders. Delete file doesn't recognize folders and will throw an error saying that the file wasn't found and the delete item can't seem to look through subfolders to delete those files and also throws an error. I've seen people suggest the HTTP request action but it looks like that would delete the entire document set which I would like to avoid.
Any suggestions are greatly appreciated. Thank you
Dear S,
I am not sure I see your problem.
With a 'List items' in sharepoint you can get all the items and with the field 'IsFolder' you can view files from folders.
If you have any specific criteria to determine what folder/file is something you want to keep you can use a Filter Array to figure out what to delete or not.
You may need to loop through several of the underlying folders with another 'List items' to delete all the lower elements.
Hope this helps,
Happy flowing,
Koen