Forum Discussion
TheBestBirth
Jun 25, 2021Copper Contributor
How to get Tree folder structure in SharePoint??
Hi All,
Hope you are safe and doing fine
I am struggling to get the following scenario to work in SharePoint.
I have a csv file like this:
Directory Name
--------- ----
D:\TEST\Folder-A\Sub_Folder-A-1 1.txt
D:\TEST\Folder-A\Sub_Folder-A-1 2.txt
D:\TEST\Folder-A\Sub_Folder-A-2 3.txt
D:\TEST\Folder-B\Sub_Folder-B-1 4.txt
D:\TEST\Folder-B\Sub_Folder-B-2 5.txt
D:\TEST\Folder-B\Sub_Folder-B-3 6.txt
D:\TEST\Folder-C 7.txt
And I like to get this into SharePoint list with tree structure view where user can have a possibility to expand/collapse folders to drill down to files and be able to select folders/files, then run a flow (Power Automate) to perform some actions for selected Folders/Files.
Like this:
,
Note:
- the folders/files are not located in SharePoint doc lib. and such (these are in Shared Folder) and the list in SharePoint shall be just mapping.
- The list of folders/files are huge (around 1.5 M. files) with quite a lot of sub-folders level.
I hope you can guide me in right direction
- Is it possible to do such a scenario in SharePoint?
- If so, how to build it up?
Really appreciate your support in advance,
Stay safe & healthy!
- Brody40Copper Contributorhi TheBestBirth,I am working on the same scenerio as you describe, do you solve your probelm? can you share me with your method?
- Kang_WangCopper Contributoryou can use Microsoft Graph API,
it will return folder structure
https://graph.microsoft.com/v1.0/groups/{group -id}/drive/root/search(q='')- Brody40Copper Contributorif my documents are stored in sharepoint, I have questions as below:
1. how can i find the goup-id?
2. /dirve/root/ can be replace by my own created directory in sharepoint?