How to analyze drive space with DiskUsage on Windows 11

<!–

–>

DiskUsage is a command-line tool for Windows 11 that allows you to quickly analyze the contents of a given folder (or the entire drive) to understand how space is being used and find out the files that are taking the most storage, which can come in handy when trying to free up space

The command-line tool also includes a bunch of options to customize the report details. For example, you can use /minFileSize to find files equal or larger of the size you specified. The /u and /t let you see the top files for a specific location and many other options.

In this guide, you will learn the steps to get started using the DiskUsage command-line tool on Windows 11.

Use DiskUsage to analyze drive usage on Windows 11

To use DiskUsage to view the drive usage or usage for a specific folder, use these steps:

  1. Open Start on Windows 11.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

    .Windows_Software_Technology-Big-343 { display:inline-block; width: 300px; height: 600px; } @media(min-width: 500px) { .Windows_Software_Technology-Big-343 { width: 300px; height: 600px;} }
  3. 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

    DiskUsage path

    In this example, the command generates a report of the disk space usage for the current location:

    diskusage /h
    Quick tip: The option /h is not a requirement, but it will display the size in a more readable format, such as in KB, MB, or GB.
  4. 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

    DiskUsage file size

  5. 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

    DiskUsage top files

  6. 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

    DiskUsage top folders

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 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.

Post a Comment