What is DiskUsage tool in Windows 10 and how to use it.
Microsoft has added a new tool, DiskUsage (diskusage.exe) to Windows 10. It is a console app that allows performing a wide range of analysis to show you advanced details for storage devices in your computer.
If you've run out of disk space or wanted to find the largest file or directory on your disk, then you know that Windows doesn't offer anything useful for disk analytics. This has changed.
DiskUsage tool in Windows 10
The new DiskUsage app is located in the C:\Windows\System32 folder, so it is available from any open command prompt and PowerShell window. The tool was first available in Windows 10 build 21277, and Insider Preview release that is known for having plenty of hidden features and options, including new window animations.
The app summarizes disk usage recursively for the given directory. Here's how it works.
How to use the DiskUsage tool in Windows 10
- Open a new command prompt as Administrator.
diskusage /minFileSize=2147483648 /h c:\windows. This will show you folders larger than 2GB in the Windows folder.
diskusage /?, and hit the
Enterkey. You will get the full reference for supported options.
You are done.
/h option shows the size values using a human-readable format rounded to gigabytes, megabytes, etc.
Note: If you run DiskUsage without any parameters, it will return information for files in the current folder. By default, the elevated command prompt opens to the C:\Windows\System32 folder, so the app will process files and folders stored in the system32 directory, and will also display some details on the disk space they use.
Here are the options DiskUsage supports.
DiskUsage - Disk Usage Description: Summarize disk usage recursively for the given directory. Usage : diskusage [Options] [Directory] Options : /a, /systemAndReserve displays size for system files and reserved space /c, /csv displays in csv format /d, /maxDepth=N displays directory information only if it is N or fewer levels below command line argument /e, /minFileSize=SIZE displays directory information only if its FileSize is greater or equal than SIZE /f, /minSizeOnDisk=SIZE displays directory information only if its SizeOnDisk is greater or equal than SIZE /g, /displayFlag=FLAG specifies the flags value to determin which column(s) to display column value description SizeOnDisk 0x001 the on disk size FileSize 0x002 the end of file size SizePerDir 0x004 sum of SizeOnDisk for top level child Files 0x008 number of child files ChildDirs 0x010 number of child directories FilesPerDir 0x020 number of top level child files DirsPerDir 0x040 number of top level child directories CreationTime 0x080 file creation timestamp LastAccessTime 0x100 file last access timestamp LastWriteTime 0x200 file last write timestamp Attributes 0x400 file attributes /h, /humanReadable displays size in human readable format /i, /iniFile=FILE takes all the parameters from an INI file. NOTE: SCENARIO name must be speificed via /j (/scenario) /j, /secnario=SCENARIO specifies the scenario name for the INI file /l, /allLinks count all hardlinks separately (By default, files with multiple hardlinks are counted only once towards the first link name) /m, /multipleName count only files with more than one link names /n, /nameFilter=FILTER count only files whose name matches the name filter /p, /preferredPath=PATH count files with multiple link names towards the first link that's under PATH if it exists NOTE: This options must not be specified togerther with /l (/allLinks) /q, /virtual recurse into virtual directories /r, /skipReparse skip recursing into reparse directories /s, /skipResurse skip recursing into child directories when calculating sizes /t, /TopDirectory=N displays Top N directories by SizeOnDisk in descending order /u, /TopFile=N displays Top N files by SizeOnDisk in descending order /v, /verbose displays verbose error information /x, /clearDefault do not display the default selected columns
The app supports a configuration files than define default command line arguments. The user can change the output formatting, and apply file name filters.
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!