“DiskUsage” is a command-line tool for Windows 11 to quickly analyze the contents of a given folder (or the entire drive) to understand how space is being used and determine the files taking the most space, which can come in handy to free up space.
The command-line tool also includes a bunch of options to customize the report details. For example, you can use the
/minFileSize option to find files equal to or larger than the size you specified. The
/t let you see the top files for a specific location and many other options.
This guide will teach you the steps to get started using the DiskUsage command-line tool on Windows 11.
Check drive space usage with DiskUsage on Windows 11
To use the DiskUsage command to view the folder or drive usage on Windows 11, use these steps:
Open Start on Windows 11.
Search for Command Prompt, right-click the top result, and select the Run as administrator option.
Type the following command to analyze the storage usage of a folder and press Enter:
DiskUsage PATH/TO/LOCATION /h
In the command, replace the PATH/TO/LOCATION for the location you want to analyze. For example, this command analyzes the contents of the Downloads folder:
DiskUsage C:\Users\user\Downloads /h
In this example, the command generates a report of the disk space usage for the current location:
DiskUsage /hQuick tip: The option
/his not a requirement, but it will display the size in a more readable format, such as in KB, MB, or GB.
Type the following command to find files larger than 4GB and press Enter:
DiskUsage /minFileSize=FILE-SIZE-KB PATH/TO/LOCATION /h
For example, this command will look and list files larger than 15MB in the Downloads folder:
DiskUsage /minFileSize=1966080 C:\Users\user\Downloads /h
Type the following command to list the top files by size on disk in descending order for a given location and press Enter:
DiskUsage PATH/TO/LOCATION /h /u=NUMBER
In the command, replace the PATH/TO/LOCATION for the location you want to analyze and NUMBER with the number of files you want to see.
For example, this command lists the top ten files from the system32 folder:
DiskUsage C:\windows\system32 /h /u=10
Type the following command to list the top folders by size on disk in descending order for a given location and press Enter:
DiskUsage PATH/TO/LOCATION /h /t=NUMBER
In the command, replace the PATH/TO/LOCATION for the location you want to analyze and NUMBER with the number of folders you want to see. For example, this command lists the top ten folders from the system32 folder:
DiskUsage C:\windows\system32 /h /t=10
Once you complete the steps, you will understand how space is used by files in a specific location or the entire drive.
The DiskUsage tool offers many other options that you can use in many scenarios. You can use the
DiskUsage /? command to list all the options available and their descriptions.
If commands are not your thing, Windows 11 also include Storage Sense to view the drive space usage, or you can also use third-party tools, such as WinDirStat, to see what files are taking up the hard drive to take action accordingly.