You can check free disk space in Windows Command Prompt using the wmic or fsutil commands, which provide quick, detailed reports without opening File Explorer. No additional tools are needed—just access to an elevated or standard Command Prompt window.

What You'll Need

  • A Windows PC (Windows 7 or later, including Windows 10 and 11)
  • Access to Command Prompt (no admin rights required for basic info)
  • Basic keyboard and screen visibility

Step-by-Step

  1. Press Windows key + R to open the Run dialog box.
  2. Type cmd and press Enter to launch Command Prompt.
  3. To check free space on all drives, type wmic logicaldisk get size,freespace,caption and press Enter.
  4. Wait for the output to appear—it will list each drive (e.g., C:, D:) with total size, free space, and drive letter in bytes.
  5. To convert bytes to gigabytes for easier reading, divide the free space value by 1073741824 (e.g., if free space is 8589934592 bytes, divide by 1073741824 to get 8 GB).
  6. Alternatively, for a single drive (like C:), type fsutil volume diskfree C: and press Enter for a more detailed breakdown including total sectors, free sectors, and bytes per sector.
  7. If you prefer a simpler numeric output, use dir C: and look at the last line showing bytes free—this works for any drive letter.
  8. To save the output to a text file for later review, append > freespace.txt to any command (e.g., wmic logicaldisk get size,freespace,caption > freespace.txt), then open the file in Notepad.

Common Mistakes

  • Typing commands with spaces in the wrong places—for example, wmic logicaldisk get size, freespace, caption (extra spaces after commas) may cause parsing errors.
  • Assuming the numbers shown are in GB or MB by default—they are always in bytes, requiring manual conversion.
  • Running Command Prompt as a standard user and expecting to see all drives—while basic info is accessible, some removable or network drives may require admin rights for full details.
  • Misreading the output order—wmic lists columns as Caption, FreeSpace, Size (not alphabetically), so FreeSpace is the second number.
  • Using outdated commands like diskperf expecting free space data—it only shows disk performance counters, not capacity.

Tips

  • Use wmic logicaldisk where "drivetype=3" get caption,freespace to filter only fixed drives (internal HDDs/SSDs) and skip USB or CD/DVD drives.
  • For a continuously updating view, combine with pause in a batch file or use PowerShell’s Get-PSDrive if you prefer richer formatting.
  • If you’re scripting, use for /f loops to parse the wmic output and trigger alerts when free space drops below a threshold (e.g., 10 GB).
  • Remember that 1 GB = 1024 MB = 1,073,741,824 bytes—use this for accurate conversion.
  • To check space on a specific partition without a drive letter (like a recovery partition), use mountvol first to list volume paths, then apply fsutil to the volume GUID.

Troubleshooting

If the command returns no output or an error:

  • ‘wmic’ is not recognized: This means Windows Management Instrumentation is corrupted or disabled. Run msinfo32 to check if WMI is working, or run winmgmt /verifyrepository in an admin Command Prompt to repair the WMI database.
  • Access denied on certain drives: Right-click Command Prompt and select “Run as administrator” to access system or protected drives.
  • Numbers seem too low or incorrect: Confirm you’re looking at the right drive letter—subst or network drives may show misleading values. Use wmic logicaldisk get drivetype,caption to verify drive types.
  • Output is cut off or wraps strangely: Maximize the Command Prompt window or redirect output to a file ( > output.txt) for clean reading.
  • No change after freeing space: Wait 10–15 seconds for the system to update free space counters, or restart Explorer (taskkill /f /im explorer.exe & start explorer.exe) to force a refresh.

Frequently Asked Questions

Can I check free space on a network drive using Command Prompt?

Yes—use the same wmic logicaldisk or fsutil volume diskfree commands if the network drive is mapped to a drive letter (e.g., Z:). UNC paths (like \server older) are not supported directly; map them first.

Why does the free space shown in Command Prompt differ from File Explorer?

File Explorer may show rounded values or include system-reserved space differently. Command Prompt reports raw bytes from the filesystem, so it’s more precise—differences of a few hundred MB are normal due to metadata or snapshot allocation.

Is there a way to see free space for all drives in a single line?

Not natively with wmic or fsutil—each drive lists on its own line. For a compact view, use PowerShell: Get-PSDrive | Where-Object {$_.Provider.Name -eq 'FileSystem'} | Select-Object Name, Used, Free.

Can I check disk space from a batch file scheduled to run daily?

Yes—save any of the wmic or fsutil commands to a .bat file, redirect output to a log with >> disklog.txt, and schedule it via Task Scheduler to monitor trends over time.

What if I see negative free space?

This indicates filesystem corruption or a serious storage error. Run chkdsk C: /f (replace C: with the affected drive) to check and repair disk errors—back up data first if possible.

Does this work in Windows Safe Mode?

Yes—Command Prompt in Safe Mode (with or without networking) still has access to wmic and fsutil, so you can check disk space even when the normal GUI is limited.