DIRGRAPH 2.0
Disc Usage Analyser
For when you need to know where all those Gigs have vanished to...
Source-code available

New in v2.0:

Many enhancements listed below! Note that emails regarding this version should be now be sent to the new author: dirgraph@yahoo.com

Contents:

Introduction | What is it? | New Author? | What's New? | Is it still Free? | The Future?
Usage | Download & Install | Requirements | Quick Tour | Options | Notes

To contact the author,
use the following e-mail address:
dirgraph@yahoo.com.

Introduction

Control Window

What is DirGraph?

DirGraph provides a graphical view of the space used by your files and directories. It allows you to navigate around this view - zooming in to see greater detail and zooming out to see the bigger picture.

It also supports colour coding its display by file dates, so you can see at a glance how much of the space used is occupied by files that haven't been accessed for an age [and that should therefore have been committed to back-up storage long ago].

It can be quite interesting to look at your system in this way: for instance did you know your games and mp3 directories was taking that much of you over-all drive space?!! No wonder there wasn't room to install the latest version of PaceMaker...

DirGraph is free to use and distribute, but if you find it or its code useful, the author would appreciate a small email letting him know if you like it and/or how you use it.

Contents

New Author?

The original version of Dirgraph was written by David J. Spillett. If you want to know about his utility (why he wrote it, etc), you can check out his web site at www.spillett.net/dirgraph (although chances are good that you probably arrived at this web site from that one).

My name is Kevin W. Stokes and I have made several changes and enhancements to Dirgraph. Why? I was recently searching on google for a disk usage utility (and preferably a free one). I found several possibilities, but when I stumbled across Dirgraph -- I really took a liking to its simple interface. Navigation is easy and the interface shows quite a bit of information without being overwhelming.

I did encounter a few problems with the utility however. First, it was slow (particularly on my home machine, which is not that powerful). Secondly, I couldn't always understand why Dirgraph calculated the numbers that it showed on the screen. For example, in my C:\ root directory, Dirgraph was showing 0.5 gig occupied. But when I went to that directory with Windows Explorer it reported 56 files taking up 156K of space. So where was the 0.49 gig that Dirgraph was reporting? (It turns out that on my Windows 2000 machine at the office, Windows is storing its swap file in the root of C:\).

I also found that sometimes the information that I wanted was in the directories lumped together at the end. There was no way way to tell the program to "lump less."

Being a programmer myself, I decided to make a few improvements to Dirgraph, so that I wouldn't trip over this kind of thing again. Among other improvements that I have made,I modified the program so that each directory has a "properties" option that will show you how its size/date/etc. was calculated, as well as how many files are present. These numbers can then be cross-referenced with Windows Explorer and it becomes pretty easy to spot what Windows is hiding. The program now also calculates how much space is wasted on the disk by cluster allocation and all of the free space reported is now calculated from Windows Operating Sytem calls (again so that it will cross-reference better with what Windows Explorer reports).

Note that David has generously donated some web space for this site, so the web page that you are reading is actually hosted by his service.

Contents

What's New?

Speed

Information

Navigation

Colour

Contents

Is it still Free?

DirGraph is still free to use and distribute. You can also download the source code, and do with it what you will. This was the way that the original version was distributed, and it doesn't seem fair for me to change this.

The program has been tested on Windows 98, ME, and 2000, but should run on any Windows platform.

If you find the Dirgraph utility (or the code) useful Dirgraph, the author would appreciate a quick email letting him know.

There is one caveat to the free distribution and use of DirGraph: If you present DirGraph on your web-site you must not link directly to any binary files [graphics or .zips] - feel free to copy them to your website and use your own bandwidth though. A link back to this HTML page would be appreciated though.

Contents

The Future?

This is a free utility and free code. Please remember the old saying "you get what you pay for." If you use the utility, you assume any risk to your computer (though it only writes files when you use the SaveAs option -- so it shouldn't be much of a threat). Also, if you find bugs/errors in the program, feel free to email them to me at dirgraph@yahoo.com. If I have time, and can reproduce the problem -- I may fix it, but this is not a gaurantee of support. The source code is available, and if you have the ability (or know someone who does) to track down the error, you can fix it and mail me the change.

If someone else uses the source-code to produce yet another version of the program (Dirgraph 3.0?) that is freely available, I will gladly link to their information from here (and David will also from the 1.3.5 page).

Quick Usage Guide

Contents

Download and Install

Download the following file: DirGraph20bin.zip. Unzip this and you will find a single executable [dirgraph.exe] . This file can be placed anywhere you like. To launch DirGraph, run this file.

To download the source-code, get the following file: DirGraph20src.zip.

To contact the author, use the following e-mail address: DirGraph@yahoo.com.

Uninstall

To uninstall, simlpy delete the .exe file. DirGraph store some settings in the registry in the key HCCU\software\vb & VBA\DJS, which you may wish to delete also.

Requirements

DirGraph requires the Visual Basic run-time libraries in order to run. It is compiled against the 'Service-Pack 5' versions, so should be used with these or newer.

If you do not have these libraries [the vast majority of people do have], or are unsure if you have an up-to-date version, please download them from Microsoft's web-site. At the time of writing, the latest versions of these libraries where available in an install package from: http://download.microsoft.com/download/vb60pro/Redist/sp5/WIN98Me/EN-US/VBRun60sp5.exe

I did not include the VB run-times with DirGraph as this would have increased the size of the download from about 250Kb to around 1.5Mb. This way only those people who need to have to download the bigger chunk.

DirGraph also used the FileSystemObject provided by Microsoft's scripting library. If you have Internet Explorer 4 or above installed on you PC then you will have this.

Contents

Quick Tour

Control Window

When you first start DirGraph, you will see a large empty area, and a small control form that looks like the image you see on the right. The main display area can be resized as you wish and any graph displayed will be resized to fit.

Enter a directory name into the text-box [the last directory you looked at is pre-entered as a default] and click 'Change To'. DirGraph will then scan the specified location and display a graph of the results - if you selected a location that contains a large number of files [i.e. an entire drive], this may take a while to complete. You can enter any path-spec here: drives [such as c:\], directories [c:\windows] and network shares [\\sirius\master]. The image below shows DirGraph displaying 'c:\program files' on my home PC.
Example screen shot 2
Note: I don't keep much here, as you will no doubt notice. Most of my apps are installed to d:\. This makes backing up the system drive easier.

Note2: The example here shows colour-coded directories - see below to see how to turn this option on.

If you hover you mouse over one of the blocks for a second-or-so, you will see a 'tool-tip' containing information about the object you are interested in, as shown here for c:\program files\microsoft office.

Any directories that are too small to display on there own get lumped together. In the example shown here program files has 68.1Mb in directories that are too small to display on there own. Enlarging the size of the DirGraph may cause some of these small directories to be display, as the available display area increases. Also, blocks are drawn for the files in a directory - program files has 32.7Mb of files in the above example.


Example screen shot 3 You can zoom in to see a directory in detail simply by double-clicking on it. In the example to the right I am taking a closer look at 'common files'.

You can zoom in to any displayed directory in this way. To zoom out a level, slimply double-click the out-most directory. For example, double-clicking 'common files' in the example to the right would return me to viewing 'program files'

If I then double-clicked 'program files', DirGraph would display 'c:\', as seen below. If you zoom out further than DirGraph has already scanned, it will automatically scan the new directory.

Example screen shot 4 To move to a completely new directory, simply enter the new location into the control form and click 'change to' as before. To force a re-scan of the current view [if you have deleted a block of files for instance], click 'change to' without entering a new location.

If you right-click on any directory you will be presented the menu shown to the left.

Example screen shot 5 The "Directory Properties" option will bring up a dialog such as the one shown to the right. This dialog displays all of the directories and files that Dirgraph used in its calculations. The wasted space is also calculated and the cluster size used is displayed. Each of the columns can be specified as the primary sort order.

The "Copy Image To Clipboard" option allows you to place a copy of the current Dirgraph winodw contents on the Windows clipboard so that it can be used by other Windows applications (Word, Excel, etc.)

The "Save Image As..." option allows you to save a copy of the current Dirgraph window contents to a Windows bitmap file.

The "Print" option has not been fully implemented (and is quite slow), but the idea was that the contents of the current Dirgraph window would be sent to the Windows default printer.

There are a number of configurable options that affect the display produced by DirGraph. To access these, click the 'show options' button on the control box. These options are described in detail below.

Contents

Options

Clicking on the "Show Options" button will increase the size of the control window and display the choices shown below.

Example screen shot 6

The Scale Factor option allows you to specify how much directory information gets "lumped" together. A scale factor of 1 will draw exactly to the boundaries of the Dirgraph application window. A scale factor of 2 will draw twice as much information as can be displayed in the Dirgraph application window, and then the scroll bars are used to move up/down and right/left. The default Scale Factor is 1.5.

The Level Width option specifies how wide each directory block should be drawn (in pixels).

The Max Display Depth option controls how many levels of subdirectories will be displayed.

There are two options regarding whether or not to display blocks when the Dirgraph program has to "lump" together files and directories too small to be displayed. A similar option allows you to show/hide the amount of free space remaining on a given disk drive.

There are also two options regarding the calculation of directory size. One allows you to specify whether the contents of child directories should be used in the calculation of the parent size and the other option is a toggle that allows you to show actual file space occupied or wasted space (per directory).

The Highlight Boundaries Colour options allow directories to be highlighted according to the age of the files they contain. You can set the colours used and the boundaries in days. For example, the default settings highlight directories containing at least on file no more than a day old in yellow. Directories that don't contain any files created in the last year are highlighted in red in the default settings, and so on.

You can highlight by 'last-modified' times, or by 'last-accessed' times. These options can be useful in deciding what to do when you need to make room on a drive. You may want to delete all files older than a year old, unless you use some of the every other day. It can also help to decide which files are simply deleted and which are backed-up first.

You can also choose whether or not to fill the entire block with color or to show the colour key in the Dirgraph application window.

Contents

Advanced Notes

Context menu example You can display more than one drive at once in DirGraph. To do so, separate them with semi-colons. For instance: to display the contents of both your c: and d: drives, enter 'c:\;d:\'. You can combine any selection of locations in this way, i.e.: 'c:\;d:\temp;\\gomeisa\xfer', though this option usually makes most sense when used with the roots of local drives.

You can add DirGraph to the context [right-click] menu as shown here. To do this, follow the following procedure:

  1. From any explorer window, select the 'Folder Options' command from the 'View' menu
  2. Select the 'File Types' tab, and find the item 'file folder' in the file-types list.
  3. Select 'file folder' and click the 'edit' command.
  4. In the resulting dialogue box, click 'New'.
  5. In the 'action' box, enter a name for the new item on the menu [i.e 'DirGraph', or 'Space Consumption Analysis'].
  6. Click the 'OK' and 'Close' buttons until you are back to Explorer.
  7. Now right-click on a folder in Explorer, and your new option will appear.

Contents

A Note to Developers

The Directory Information dialog in Dirgraph uses Windows Subclassing to color the individual entries of the listview. If you try to launch into the Visual Basic debugger while this is active, the IDE will appear to hang. This is because the debugger has injected a breakpoint and the Subclassed window is still waiting for input. The only way to use the Visual Basic IDE to debug this program is to temporarily comment out the subclassing. This can be done by commenting out the first line of the Form_Load() procedure. If anyone ever converts this project to VB .net, then the need for Windows Sublclassing will go away.

This page was created with Microsoft Visual Interdev and tested using Internet Explorer 5.5 at screen sizes 800x600 and 1024x768. It should display fine in just about any browser that supports tables [and most that don't], at any resolution or colour depth. If your browser is unhappy with my HTML, let me know.