Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
SteveKWWHA
Frequent Visitor

Sharepoint Folders and Items in Folders

Hi All

 

As an audit requirment tasked to me, i need to generate a list of all the folders within a document library, the sub folders and whether they have any items (or count of how many items exist in that folder)

 

I can connect to the site > access the folders but it is only giving me a list of the folders where a file exists. Ideally, what i want to produce is a report showing: 

 

Folder name

Sub Folder Name

Items in Sub Folder

 

Not sure if this is possible but if someone does know ny help would be greatly appreciated

 

Thanks

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @SteveKWWHA,

According to your description, I think folder connector should suitable for your requirements(get detail information of a specific path and its child)but it only works on 'absolute path' and does not compatible with dynamic web URL.

For this scenario, I'd like to suggest you to use external tools(e.g. PowerShell or programming language) to export detail SharePoint folder contents and save to local file, then you can use power bi to get data from that file.

In addition, you can also try to use power query to invoke python code with iterator function to looping detail contents of a directory.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @SteveKWWHA,

According to your description, I think folder connector should suitable for your requirements(get detail information of a specific path and its child)but it only works on 'absolute path' and does not compatible with dynamic web URL.

For this scenario, I'd like to suggest you to use external tools(e.g. PowerShell or programming language) to export detail SharePoint folder contents and save to local file, then you can use power bi to get data from that file.

In addition, you can also try to use power query to invoke python code with iterator function to looping detail contents of a directory.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
tkirilov
Resolver I
Resolver I

Hi @SteveKWWHA ,

 

I don't think Power BI alone can do that, but I am aware that there is a way of achieving that using PowerShell. I found this article (link below), which seems to describe how to achieve what you are looking for, but I must admit I don't know much about PowerShell.

 

https://www.sharepointdiary.com/2018/08/sharepoint-online-powershell-to-get-all-files-in-document-li...

 

Best,

Tom

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.