How to get the total number of nested files and folders inside the main folders inside a document li

Iron Contributor

We have a SharePoint online document library which contain 40 folders on the root. now i want to count how many nested sub-folders and files each of the 40 folders contain? now in SharePoint the built-in "File Size" column will show how many direct folders and files exists and not the nested number of files and folders. 

 
 

image.png

 

so can i write a power shell script or other approaches to get the total number of nested sub-folders and files?

0 Replies