Hello new to Flow.
I've researched through this community and tried various methods but still cannot get files to delete from a subfolder within SharePoint. I have tried to just go get the files and display in a table to see if it's even grabbing the right files and have been unsuccessful. The last attempt has been to just delete all files within a subfolder which I was still unable to successfully complete.
I would like to delete files older than 90 days but for now I think being successful at using flow to just delete files from a folder is a good start.
As you'll see from my screenshot, the files I want to delete are not on the main parent folder but within a few layers:
This is a screenshot of my flow for deleting all files within the subfolder. The flow completes successfully but nothing is deleted.
Solved! Go to Solution.
Hi @tranimal3 ,
You can try to use List folder action to get all files in the specified folder, and then use Delete file to delete all files in the folder.
This action can only get the files in the specified folder, but it cannot get the files in the subfolders contained in this folder.
I have tested it on my side and it can delete all files in the folder.
Image reference:
Hope this helps.
Best Regards,
Hi @tranimal3 ,
You can try to use List folder action to get all files in the specified folder, and then use Delete file to delete all files in the folder.
This action can only get the files in the specified folder, but it cannot get the files in the subfolders contained in this folder.
I have tested it on my side and it can delete all files in the folder.
Image reference:
Hope this helps.
Best Regards,
Perfect! Thanks @v-bacao-msft for the help. I was able to delete the files.
I also added a condition in to delete the files older than 90 days.
Thanks again!
User | Count |
---|---|
78 | |
55 | |
52 | |
43 | |
39 |
User | Count |
---|---|
80 | |
79 | |
75 | |
67 | |
43 |