Find the twenty largest files on the drive in one command
Explorer search, a PowerShell one-liner and the elevation detail that decides whether the answer is complete or quietly short.
Two questions get confused constantly. Which files are largest is answered below in one line. Which folder is largest is a different question with a different tool, because a folder of forty thousand small files never appears in a list of large files and can still be the reason the drive is full.
Explorer, with the search syntax nobody documents
| Type this in the search box | Finds |
|---|---|
size:gigantic | Files over 4 GB |
size:huge | 128 MB to 4 GB |
size:>1GB | Anything over 1 GB |
size:>500MB datemodified:<01/01/2025 | Large and old, together |
ext:iso OR ext:vhdx | The file types that are usually the largest |
Switch to Details view and add the Size column, then sort by it. Explorer's search leans on the index, so results in indexed locations appear immediately and unindexed ones trickle in, which is covered in the search index.
PowerShell, which does not depend on the index
# The twenty largest files anywhere on C. Run elevated.
Get-ChildItem C:\ -Recurse -File -Force -ErrorAction SilentlyContinue |
Sort-Object Length -Descending | Select-Object -First 20 `
@{n='GB';e={[math]::Round($_.Length/1GB,2)}}, LastWriteTime, FullNameWithout elevation this misses every folder your account cannot read and reports no error, because -ErrorAction SilentlyContinue is what stops it stopping. The result looks complete and is not, which is the single most common way this command misleads people.
# Largest per extension, which usually names the culprit faster
Get-ChildItem C:\Users -Recurse -File -Force -EA SilentlyContinue |
Where-Object Length -gt 50MB |
Group-Object Extension |
Select-Object Name, Count, @{n='GB';e={[math]::Round(($_.Group | Measure-Object Length -Sum).Sum/1GB,2)}} |
Sort-Object GB -Descending | Select-Object -First 12What the answers usually are
| File | Typical size | Covered in |
|---|---|---|
pagefile.sys | 1 to 16 GB | The page file |
hiberfil.sys | Around 40 percent of memory | The hibernation file |
*.vhdx, *.vdi, *.vmdk | 20 to 200 GB | Virtual machine disks |
*.iso | 4 to 9 GB each | Usually in Downloads |
| Video exports and camera files | 1 to 50 GB | Creative work |
The single files that come top of the list are rarely the interesting answer, because most of them have to exist. The folder totals are where the recoverable space is, and that is what what is actually filling the C drive walks through.
For a picture rather than a list, a treemap makes the shape obvious in a way a sorted list cannot: TreeSize, WizTree and WinDirStat compared.
Common questions
How do I find the largest files on Windows?
In Explorer, search the drive for size:gigantic or size:>1GB and sort by the Size column. In PowerShell, list files recursively and sort by Length, running elevated so nothing is silently skipped.
Why does my file search miss some files?
Two reasons. Explorer's search depends on the index in some locations, and a PowerShell walk without elevation skips every folder your account cannot read while reporting no error.
What does size:gigantic mean in Windows search?
It is Explorer's built-in filter for files over 4 GB. size:huge covers 128 MB to 4 GB, and size:>500MB works for an explicit threshold.
Why is my drive full when I have no large files?
Because thousands of small files add up. Build output, caches and package folders are made of tiny files, so they never appear in a search for large ones.