Here's how to list folders by size on Windows

Coach and Six

Full Member
I had a very full hard drive and I was looking around for some way of just seeing what the big folders were so I could clean it up.

I spent ages online trying to figure out how to do it but chat GPT actually gave me a very handy command for Windows Command Prompt that worked a treat which might help others:

1. Type "cmd" into the windows search box in your task bar.
2. Open the Command Prompt tool.
3. To get to your hard drive type "cd /" and press return.
4. Type "dir" and you'll see the directory of your hard drive.
5. Copy this command into the window and press return (handy tip: after copying it below, go to the Command Prompt and click your right mouse button to paste it)
powershell "Get-ChildItem -Directory | ForEach-Object { $size = [math]::Ceiling((Get-ChildItem $_.FullName -Recurse | Measure-Object -Property Length -Sum).Sum / 1MB); [PSCustomObject]@{Name=$_.Name; SizeMB=$size; FullName=$_.FullName} } | Sort-Object SizeMB -Descending"

It will show you a list of directories in order of increasing size with the largest one at the bottom (if you want some other tweak to it, I'd advise asking chatGPT, it's very good).

If you want to go into a particular directory and search within that. Type "cd somedirectory" and then run the command in there to see what the biggest folders are.
If you want to go back a level type "cd .." (two dots).

Fáilte romhaibh.
 
EVENT GUIDE - HIGHLIGHT
Meadhbh Walsh
Cyprus Avenue, Caroline St.

6th Sep 2024 @ 7:00 pm
More info..

Indie/Folk Music

Franciscan Well Brew Pub, Tomorrow @ 8pm

More events ▼
Top