Copyright: Copyright ® 1994 by Neil J. Rubenking


Contents
DISKPIE Help Contents

How much of your hard disk space is devoted to Windows?  What percentage of your disk is occupied by those clever WAV sound files?  DISKPIE will tell you all this and more!

Overview

DISKPIE's Menus

 File Menu

Options Menu

Window Menu

Help Menu


File Menu

If no pie windows are open, only the Get Colors and Exit menu choices will appear.

File Menu Choices

 Get Colors

Print

Print Setup

Exit


Get Colors

 Visual Basic's GRAPH control doesn't provide an easy way to tell which pie slice was clicked on, so DiskPie must deduce it from the color of the pixel at the clicked point.  To do that, DiskPie has to know what colors are used.  The first time it runs, DiskPie creates a pie with 14 slices (all the standard pie colors except white and black) and records the color of each slice in DISKPIE.INI.

If you change your Windows video driver, the colors of the pie slices may change.  DiskPie automatically refreshes the stored slice color values if it detects a change in the video driver.  If clicking on a pie slice has no effect, choose this menu item and DiskPie will grab the current set of colors.  Note that DiskPie requires a video mode with at least 16 colors.


Print

One simple function call tells a Visual Basic graph control to print itself.  By default, it switches to monochrome and replaces color with cross-hatching.  DiskPie makes some other changes to the graph before printing.  It replaces the usual percent labels with simple index numbers, and prefixes the legends at the right with the corresponding numbers.  It also appends the actual number of bytes and percentage to each legend.  Finally, it adds labels to the graph identifying the program and the directory that's being analyzed.


Print Setup

DiskPie's Print Setup simply calls on Windows's own internal print setup dialog.  This allows you to select which installed printer to use, to choose Portrait or Landscape mode, and to set the paper size.  DiskPie's output works best in Landscape mode.


Options Menu

The Options menu lets you notify DiskPie of your preferences.  You can choose whether or not DiskPie will save its layout at the end of each session, and you can set the maximum number of pie slices used in DiskPie's pie charts.

 Save Layout on Exit

Maximum Slices


Save Layout
Save Layout on Exit

Checking this menu item tells DiskPie to save the layout of its main window and pie windows when it exits.  It stores its current size and location in DISKPIE.INI.  Then for each open child window, it stores size, location, and whether or not it's minimized, along with all the graph data for that child window.  DiskPie restores any maximized child windows to their normal state before recording their size and position.

The next time you start DiskPie, it will position itself according to the stored size and position, and it will re-create each of the saved child windows.  It's possible that the data charted by the child windows may have changed.  In that case, use the Refresh Active Window choice from the Window menu to update the data in the active window.


Slices
Maximum Slices

By default, DiskPie's child windows will display up to 14 pie slices.  If there are more than the maximum number of directories or extensions, DiskPie merges the smallest ones into a slice called "OTHER".

However, you may find that you're only interested in the biggest six or eight slices, and that numerous tiny slices just clutter the graph.  In that case, use this menu to select a different maximum.  You can tell DiskPie to use as few as five slices.  When you change the Maximum Slices setting, it is immediately stored in DISKPIE.INI.

Changing the maximum slices value affects all child windows created after the change.  To update an existing window with the new number of slices, activate it and then select Refresh Active Window from the Window menu.


Window Menu

If no child windows are open, the Window menu consists of nothing but the New Dir Window and New Ext Window menu choices.  When at least one child window is open, this menu expands to include all of the choices below.   The captions of all open child windows are added at the bottom of the menu.  A check mark indicates the active child window, and you can activate a different child window by clicking on its caption in this menu.

 Cascade

Tile

Arrange Icons

New Dir Window

New Ext Window

Refresh Active Window

Balance/Sort Slices


Cascade

Arranges open child windows with each one offset to the right and down from the previous, so that the title bar of each window is visible.


Tile

Arranges open child windows so that all occupy roughly the same amount of space and no window overlaps another.


Arrange Icons

Places the icons for all minimized child windows in rows, starting at the bottom left corner of the main program and going from left to right, bottom to top.


New Dir Window

This menu item lets you select any directory and display a directory pie for that directory.  If the chosen directory has no subdirectories, DiskPie will automatically display an extension pie instead.


New Ext Window

This menu item lets you select any directory and display an extension pie for that directory.


Refresh Active Window

Once DiskPie has created a pie window, the graph is static.  If you create or delete files, the relative percentages displayed in the pie window may no longer be accurate.  This menu option refreshes the active pie window with current data.  Use it also to re-create the active pie window after you've changed the maximum number of slices with the Maximum Slices menu.


Help Menu

The Contents... menu choice brings up the contents page of this help system, and the Search for Help On... menu choice displays the Search dialog box.  For help on using Windows Help in general, select Help on Help.

Choosing About DiskPie... displays copyright and publication information for the program, along with a variety of information about memory and other Windows resources.


Directory Pie

 A directory pie displays the subdirectories of the selected directory as pie slices, with the size of each slice depending on the size of all the files in and below the subdirectory.  It also includes a slice corresponding to the size of all the files in the base directory itself.  The base directory slice is different from the rest, because it doesn't include files in subdirectories, so its name is shown in square brackets.  In the example pie above, the [e:\util] slice represents the base directory, and files in and below e:\util\diskpie make up 32.1% of the total.

Subdirectories that contain no files will normally be omitted from the pie.  The one exception comes in a directory that has precisely one subdirectory.  A Visual Basic pie chart must have at least two slices, so even if the base directory or the lone subdirectory is empty, it will still be shown.

If the pie window is very small or the directory names very long, they may be difficult to read.  Click on a pie slice and the directory name, the actual number of bytes used, and the percentage will appear on the status bar.  Or, press the space bar to cycle through the slices, displaying each in turn on the status bar.

Double-click on a pie slice to open a new directory pie window for that subdirectory.  Or, press Enter to open a new directory pie window for the subdirectory whose name is shown on the status bar.  If the selected subdirectory has no subdirectories of its own, you'll automatically get an extension pie instead.

The icon for a minimized directory pie window is a slice of pie with a tree growing from it.


Extension Pie

 An extension pie breaks down the space usage in the selected directory and its subdirectories by extension.  Each slice's size depends on the percentage of space occupied by files with that extension.  In the example above, 32.1% of the files in and below e:\util\diskpie are TXT files.

DiskPie assumes that if all files with a given extension are zero bytes in size, you don't need to see a slice corresponding to that extension.  It will normally eliminate any slices whose size is zero bytes.  The one exception is if there are only two slices.  Visual Basic's Graph control requires at least two slices, so a zero-byte slice will be retained in this case.  Also, if all the files in and below the specified directory have the same extension, DiskPie will include a nameless zero-byte slice to satisfy the two-slice minimum.

If you click on a pie slice, DiskPie will put the slice's name, actual number of bytes, and percentage on the status bar.  Or, press space bar to display detailed information for each slice in turn on the status bar.

The icon for a minimized directory pie window is a slice of pie with the letters EXT next to it.


Status Bar

The status bar is found at the bottom of the main program window.  It consists of a color circle and a line of text.  When DiskPie is in the process of scanning the disk for information, it keeps you posted on its progress by putting messages on the status bar.  If you click on a pie slice in a finished pie window, detailed information about that slice will appear on the status bar, and the slice's color will be copied to the status bar's color circle.  You can also get detail slice information into the status bar by pressing the space bar repeatedly.


Overview

No matter how big your hard disk, eventually you'll find that you're running out of free disk space.  If you want to add anything new to your system, you'll have to delete some old files first.  But which ones?  DiskPie helps you decide. It displays a pie chart of the biggest consumers of disk space in and below specified directory, broken down in one of two ways.  First, it can display all the subdirectories of the chosen directory, with the pie slice size proportional to the size of the files in and below each subdirectory.  This is called a directory pie.  Second, it can tally up disk space by file extension for all files in and below the selected directory.  This is called an extension pie.

DiskPie can have several windows open at once.  It's arbitrarily limited to nine windows, but you're not likely to run into this limit.  You can maximize individual windows, minimize them to icons, or use the Window menu to Cascade or Tile them.  When you quit DiskPie, if the Save Layout choice on the Options menu is checked it will save its current size and position in DISKPIE.INI, along with the size, position, and graph data for each pie window.  When DiskPie starts, it restores the layout and window information found in DISKPIE.INI.


Exit

When you exit DiskPie, if the Save Layout choice on the Options menu is checked the program will save its current layout to DISKPIE.INI.  When you start DiskPie again, it reads the layout from DISKPIE.INI.


Balance Slices

Sort Slices

When DiskPie creates a pie window, it displays the slices in sorted order, from largest to smallest, starting at the "twelve o'clock" position and going counterclockwise, as in the picture below.  Note that the legends to the right of the graph are also in order, with the largest at the top.

 SORTED:  This arrangement tends to push the very smallest slices together at the top of the chart, causing their percent labels to overlap.  When you choose Balance Slices, DiskPie will attempt to re-arrange the slices to avoid that overlap.  It will also change the Balance Slices menu option to Sort Slices.

 BALANCED:  Here all of the labels are visible, but there's no particular order to the slices or to the legends at the right of the graph.  If you don't like the result, choose Sort Slices from the Window menu to restore the original order.  This will also change the Sort Slices menu option back to Balance Slices.

Each pie window can be balanced or sorted independently of the rest.  The Window menu will contain the Balance Slices option if the active pie window is sorted, or the Sort Slices option if the active pie window is balanced.  The Layout information stored for each window in DISKPIE.INI indicates whether the slices are balanced or sorted.


DISKPIE.INI

DiskPie stores its settings and layout information in the file DISKPIE.INI in your Windows directory.  The information is in text form, but you should not attempt to edit the INI file directly.  DISKPIE.INI always contains a [Settings] section, and may contain up to nine sections of the form [Window n].

The [Settings] section contains information about DiskPie as a whole.  The keys in this section are:

Left=, Top=	The stored location of the main DiskPie window, in twips (twentieths of a point).

Width=, Height=	The stored dimensions of the main DiskPie window, in twips (twentieths of a point).

Color n=	The red/green/blue color value for each of fourteen pie slice colors.  Select Get Colors from the File menu to refresh these values.

Save Layout=	Controlled by the Save Layout choice on the Options menu.  If TRUE (-1), the location and dimensions of the main window and the location, dimensions, and graph data for the pie windows will be saved when you exit DiskPie.

Slices=	Controlled by the Maximum Slices submenu of the Options menu.  This key controls the maximum number of slices that will be shown in a pie window.  If there are more slices than the maximum, they will be lumped together in an "OTHER" slice.  The value must not be less than 5 or greater than 14.

NumWindows=	The number of pie windows whose layout is saved.

display.drv=	The name of the display driver that was active when DiskPie was last run.  If the current display driver name is different when DiskPie starts, it automatically refreshes the slice color values.

DISKPIE.INI also has up to nine window information sections.  The headings for these sections are [Window 0], [Window 1], and so on.  The keys in these settings are:

Type=	T for a Tree (directory) pie, E for an Extension pie.

Dir=	The name of the base directory for this pie.

State=	The window's display state, 0 for normal, 1 for iconized.

Left=, Top=	The stored location of this window within the main DiskPie window, in twips (twentieths of a point).

Width=, Height=	The stored dimensions of this window, in twips (twentieths of a point).

Slices=	The number of slices in this pie window.

Balanced=	If TRUE (-1), the slices are balanced to avoid overlapping labels; if FALSE (0), the slices are sorted from largest to smallest.

Data n=	Size data for the nth slice.

Legend n=	Legend text for the nth slice.