Find Large Files Eating Your Disk Space with CMD

Discover which files are hogging your storage. Learn CMD and PowerShell commands to quickly find the biggest files on your computer without third-party tools.

Find Large Files Eating Your Disk Space with CMD
On this page
  1. Introduction
  2. CMD Method (Quick)
  3. PowerShell Method (Recommended)
  4. Common Space Hogs
  5. FAQ

Introduction

TL;DR

Run in PowerShell: Get-ChildItem -Recurse | Sort-Object Length -Descending | Select-Object -First 20 Name, Length

Your disk is almost full, and Windows is nagging you to clean up. But where are all your gigabytes going?

Third-party tools like WinDirStat work, but they're slow and require installation. The built-in command line can find your largest files in seconds.

CMD Method (Quick)

The classic Command Prompt can list files sorted by size. It's not as powerful as PowerShell, but works on all Windows versions.

1Open CMD as Administrator

Search "cmd" in Start Menu, right-click, and select "Run as administrator". This lets you scan protected folders.

2Run the Size Command

Command Prompt (Admin)
C:\>forfiles /S /C "cmd /c if @fsize GEQ 104857600 echo @path @fsize"
(Lists all files larger than 100MB)
Note

This command is slow on large drives. PowerShell below is much faster.

PowerShell Method (Recommended)

PowerShell is faster and gives you more control over the output format.

PowerShell Disk Scan Workflow

Find Top 20 Largest Files

PowerShell
Get-ChildItem -Path C:\ -Recurse -File -ErrorAction SilentlyContinue | Sort-Object Length -Descending | Select-Object -First 20 @{N='Size(GB)';E={[math]::Round($_.Length/1GB,2)}}, FullName | Format-Table -AutoSize
Size(GB) FullName
-------- --------
4.2 C:\Users\You\Downloads\game.iso
2.8 C:\Windows\MEMORY.DMP
1.5 C:\hiberfil.sys
...

Find Files by Extension

Looking for large video files specifically?

PowerShell
Get-ChildItem -Path C:\ -Include *.mp4,*.mkv,*.avi -Recurse -File | Sort Length -Desc | Select -First 10

Common Space Hogs

Downloads Folder

Old installers, ISOs, and zip files pile up here. Check C:\Users\YourName\Downloads

Windows Temp Files

Run %temp% in the Run dialog and delete old files. Also check C:\Windows\Temp

Windows.old Folder

After Windows updates, this can hold 20+ GB of old system files. Use Disk Cleanup to remove safely.

Frequently asked questions

Why does the scan take so long?

Scanning every file on a drive with millions of files takes time. For faster results, target specific folders like C:\Users instead of scanning the entire C:\ drive.

Is it safe to delete large files I find?

Be careful with system files (hiberfil.sys, pagefile.sys, Windows folders). Focus on your personal folders like Downloads, Documents, and game installations.

Can I export the results to a file?

Yes! Add `| Out-File large_files.txt` at the end of any PowerShell command to save results to a text file.

Keep reading

Create a Folder Structure Template with One CommandProductivity

Create a Folder Structure Template with One Command

Set up project directories instantly. Learn to create entire folder hierarchies with a single CMD command—perfect for developers and organized workflows.

MD Kawsar· January 18, 2026 · 4 min read
Delete Empty Folders in Seconds Using CMDProductivity

Delete Empty Folders in Seconds Using CMD

Clean up your file system by removing hundreds of empty folders instantly. A simple one-line command does the trick—no software needed.

MD Kawsar· January 18, 2026 · 3 min read
Batch Rename Files with CMD: The Complete GuideProductivity

Batch Rename Files with CMD: The Complete Guide

Rename hundreds of files in seconds using Windows Command Prompt. Learn wildcards, patterns, and batch processing without installing any software.

MD Kawsar· January 18, 2026 · 5 min read

Want us to build this for you?

Tell us what data or workflow you need. We reply within a few hours.

Book a free call ↗