When using Windows Explorer for viewing your files and directories on your Computer, one item missing from Explorer's default view is which directories are taking up the most space on your hard disk. You can easily view how much Total Size and Free Space is available, but Windows Explorer does not report individual directory sizes unless you look at the properties of each directory.
To remedy this problem of finding which directory is eating up your free space, I like to use a tool called Directory Disk Usage.
Directory Disk Usage, known as diruse is a free command line tool found on Microsoft's Help and Support site. Using diruse is easy. After you have downloaded the tool, install by clicking on diruse_setup.exe.
After installing the program, open a command prompt and run:
cd "\Program Files\Resource Kit"
diruse /M /* c:\
where:
/M - reports in Magabytes
/* - Uses the top-level directories residing in the specified directory (In the above example C:\ is the specifed directory)
Below is the results of the output:
Size (mb) Files Directory
0.22 3 SUB-TOTAL: C:\$VAULT$.AVG
301.49 3649 SUB-TOTAL: C:\Documents and Settings
539.93 6797 SUB-TOTAL: C:\I386
4767.69 13447 SUB-TOTAL: C:\OTHER
957.58 8666 SUB-TOTAL: C:\pebuilder3110a
1278.40 12564 SUB-TOTAL: C:\Program Files
504.03 1586 SUB-TOTAL: C:\RECYCLER
2194.60 8086 SUB-TOTAL: C:\System Volume Information
2346.51 15754 SUB-TOTAL: C:\WINDOWS
12890.45 70552 TOTAL
The above results show the C:\OTHER directory is using 4767.69 Mega Bytes of disk space. Next, I'll run the diruse command again, against C:\OTHER to drill down and find the exact directory eating up my disk space:
diruse /M /* c:\OTHER
Below is the results of the output:
Size (mb) Files Directory
2.91 14 SUB-TOTAL: C:\OTHER\BusinessInfo
61.98 1309 SUB-TOTAL: C:\OTHER\software
41.60 41 SUB-TOTAL: C:\OTHER\drivers
0.02 21 SUB-TOTAL: C:\OTHER\work
3.03 9 SUB-TOTAL: C:\OTHER\config
0.00 3 SUB-TOTAL: C:\OTHER\lnetwork
182.16 537 SUB-TOTAL: C:\OTHER\bkup
14.71 6 SUB-TOTAL: C:\OTHER\vpnclient
1.81 60 SUB-TOTAL: C:\OTHER\info
817.20 224 SUB-TOTAL: C:\OTHER\tools
515.25 449 SUB-TOTAL: C:\OTHER\wtnfiles
3089.50 10765 SUB-TOTAL: C:\OTHER\MP3
4730.18 13438 TOTAL
As you can see from the results above, the MP3 directory is using 3.089.50 Gigabytes of disk space. From here I can open up Windows Explorer and start cleaning up or backup to an USB Drives any unused Mp3 files to reclaim back some disk space.
Diruse is a versitile tools that replaces the missing functionality of Windows Explorer with displaying individual directory sizes on you Hard Disk. If the output of your list is large, dir use can redirect the output to a text file to help you view it. To redirect use the > character as shown below:
diruse /M /* c:\OTHER > "\Program Files\Resource Kit\output.csv"
Diruse syntax:
DIRUSE {/s | /v} {/m | /k | /b} [/c] [/,] [/q:# [/l] [/a] [/d] [/o]] [/*] [DirList]
Where:
/s
includes subdirectories of the specified directories in the output.
/v
writes progress reports while scanning subdirectories. The /v is ignored if /s is specified.
/m
displays disk usage in megabytes.
/k
displays disk usage in kilobytes.
/b
displays disk usage in bytes (default).
/c
uses compressed file size instead of apparent file size.
/,
displays the thousands separator (comma or period) in file sizes.
/q:#
marks directories that exceed the specified size (#) with an exclamation point (!). If /m (megabytes) or /k (kilobytes) is not specified, the size is assumed to be in bytes. If /q is specified and any directory is found that exceeds the specified size, then the return code is ONE. Otherwise the return code is ZERO.
The following switches can be used in conjunction with /q:
/l Writes overflows to the log file diruse.log in the current directory.
/a Specifies that an alert is generated if sizes specified by /q:# are exceeded. The Alerter service must be running, and the alert appears only when you are using Diruse.
/d Displays only directories that exceed specified sizes.
/o Specifies that subdirectories are not checked to see if they exceed the specified size.
/* uses the top-level directories residing in the specified DirList.
DirList specifies a list of directories to check. DirList is required. Use semicolons, commas, or spaces to separate multiple directories.