Jump to content

How to create a list of ALL files stored in a users OneDrive showing file size data


Recommended Posts

Posted

As title, I'm trying to work out how for a specific user I can create an Excel spreadsheet listing all the files in a particular user's OneDrive account that also shows file size data.

 

Googled and cannot seem to find anything :/

Posted (edited)

Not tried it on Onedrive - there is a Powershell (I think) command that I found out about ion here that works on network drives...

 

And this is what it is!!

 

A discovery!

 

There is a method for creating a .csv of all the filenames (and other unwanted information) direct from Windows. I have done this for both A & Gcse folders; I’ll tidy up a bit next).

 

The method –

 

Hold [shift] and right click on folder

Click – “Open Powershell window here”

Type (or copy/paste) dir | Export-Csv MyFileList.csv

 

 

A .csv file will magically appear within the target folder!

 

I'm sure someone can tell us how to get it to work down through the file structure below the root.

Edited by Andrew_C
Posted
As title, I'm trying to work out how for a specific user I can create an Excel spreadsheet listing all the files in a particular user's OneDrive account that also shows file size data.

 

Googled and cannot seem to find anything :/

 

Get-PnPListItem should be able to give you that e.g. https://www.sharepointdiary.com/2020/05/sharepoint-online-get-file-size-using-powershell.html

 

Note: you need PowerShell v7 installed to use it and then install PnP using guide here https://pnp.github.io/powershell/index.html

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...