On Windows 10, DiskUsage is a command-line tool that allows you to quickly analyze the contents of a given folder or the entire storage drive to understand how space is being used and find out which files are taking the most space, which can come in handy when trying to free up space.
The tool also includes a bunch of options to customize the report details. For instance, you can use
/minFileSize to find files equal or larger of the size you specified. The
/t let you see the top files for a specific location, and many other options.
DiskUsage is still a work in progress that was introduced with the release of Windows 10 build 21277 available through the Windows Insider Program, and it is expected to eventually become part of the operating system in future releases.
How to use DiskUsage command on Windows 10
To generate a report of the hard drive usage for the entire storage or specific folder, use these steps:
Open Start on Windows 10.
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
/hoption is 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 4GB in the Downloads folder:
diskusage /minFileSize=4294967296 C:\Users\user\Downloads /h
Type the following command to list the top files by size on disk in a 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 a 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 s /h /t=10
Once you complete the steps, you will be able to understand how space is being used by files in a specific location.
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 the command-line is not for you, Windows 10 also include the Storage sense feature to see the hard drive usage. Alternatively, you can also use third-party tools, such as WinDirStat, to see what files are filling out the hard drive to take action accordingly.