pc.jpg

STOP spending your hard earn money by having someone else fix your Computer. Do it yourself and save a bundle of cash.
Click for more info --> Windows PC Troubleshooting Unleashed!

Windows Tip: How To Find Directories That Are Taking Up Space On Your Hard Disk

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

Filed under Windows Tips by

Comment

Comments on Windows Tip: How To Find Directories That Are Taking Up Space On Your Hard Disk »

February 27, 2007

George @ 1:33 am

This may sound silly, but I have a question. Does listening to radio stations, that you normally would on a home stereo, take up space on your hard disk if you listen to them for long periods of time? eg. Rock 101 FM in Vancouver…I pick this up so clear on the internet, better than the home stereo system…

Watching The Net @ 7:18 am

George, this is a good question and the answer is no it does not take up disk space. The stations are streamed over the Internet allowing you to listen to the radio without the need to save anything on your hard disk.

March 4, 2007

Ashley @ 4:48 pm

Hi, im running windows vista, its eatin up space like you would not believe and i don't know where its going, it has somewhere taken up 6gigs in the past half day and have no idea where it has gone as there are no folders where it is being used, please help. Also diruse does not seem to work with vista, only for windows 2000 i think, do you know any other programs that will tell me where the space is being used ??? Any help will help alot. Thanks very much

March 5, 2007

Watching The Net @ 2:43 pm

Ashley you can download an eval copy of TreeSize Professional (Jam Software) at http://www.jam-software.com/treesize/index.shtml which will list directories by their size.

Ash @ 6:27 pm

thanks very much for reply, i found the problem though. a very big problem, 20gigs of a problem by the end of the day! it turned out it was the System Restore feature which takes 15% of your hdd space. cheers anyway tho, great site also

Watching The Net @ 7:43 pm

Glad you found the problem . Sounds like a tip I need to add to Watching The Net!

March 17, 2007

Connie Hawkins @ 6:40 pm

thank you so much for this reference

July 11, 2007

Dave Ashworth @ 8:18 pm

Has noone used windirstat?

It's a bit unusual in that it has strange colours to represent files in directories but it works really well, It helped me find an 8Gb DVD copy a customer had put in an obscure directory with a big blob of colour!

Leave a Comment

Subscribe without commenting