                         DirStats version 2.0
               copyright 1992,1994 by Philip VanBaren

This utility displays a pie chart of the disk space, showing the amount
used in each directory.  It supports DOS versions 2.0 and above, and Hercules,
CGA, EGA, VGA, 8514, and SVGA displays.  The SVGA driver included was
written by Jordan Hargrave.  Refer to the BGIREAD.ME file for more details
on the use of these drivers.  The other drivers are supplied by Borland.

This program was formerly released as DISKUSE, but, since that name has
been used by someone else, I decided to give this program a new name.

DISCLAIMER

This program is FREE.  You may use and distribute it as long as credit 
is given to the author, and no modifications are made.
The author hereby disclaims all warranties relating to this software,
whether express or implied, including without limitation any implied
warranties of merchantability or fitness for a particular purpose.
The author will not be liable for any special, incidental,
consequential, indirect or similar damages due to loss of data or
any other reason, even if the author has been advised of the possibility 
of such damages.  The person using the software bears all risk as to the
quality and performance of the software.

FILE LIST

The files included with this program are:
   dirstats.exe  The main program.
   dirstats.txt  This file.
   *.bgi         Graphics drivers
   bgiread.me    Readme file for the SVGA16 BGI driver

To run the program, you need only dirstats.exe and the .bgi driver for your
display.  The .bgi file should be in either the same directory as 
DIRSTATS.EXE or a directory in the DOS path.

WARNING: It is possible that the SVGA16.BGI driver does not work with
your computer.  In this case, delete the SVGA16.BGI file, and the program
will default to VGA mode.  You may also use the /d and /m commands to 
manually pick the graphics driver and mode, as described below.

Note: The Borland IBM8514.BGI file requires that the 8514 Adapter Interface 
(AI) program be installed.  On my video card (ATI) this interface is loaded 
using a utility program called HDILOAD.EXE, which came with the video 
drivers that I received with the card.  I assume that any other card which 
supports 8514 has a similar program.  Check your video card's documentation.

RUNNING FROM WINDOWS

To set up the program to run under Windows, drag the dirstats.pif file from 
File Manager to a Program Manager group.  Then, with this new icon selected, 
select File..Properties from the menus.  If you want to specify the drive
to examine, add the drive name to the end of the Command Line box, (e.g.
"c:\utility\dirstats.pif d:").  You may also specify the graphics driver 
number and mode by adding /d and /m commands as described below.  
Next select Change Icon and define the icon as DIRSTATS.ICO.  Then select OK
a couple of times to get out of the Program Item Properties dialog box.  
Finally, start up the PIF editor (in the Main group) and open the 
DIRSTATS.PIF file.  In the Program Filename box, change the drive, path, and
file name to the directory in which you have installed the DIRSTATS.EXE file.
If you want to add icons for additional drives, copy this icon, select 
File..Properties for the new icon, and change the command line to specify the
new drive.
Note:  The 8514 drivers might not work under Windows.  I have tried this 
with both ATI Graphics Ultra and ATI GUPro running the Mach Windows drivers,
and this driver did not work properly.  It may work for other cards, but 
this has not been tested.

COMMAND LINE

   DIRSTATS <drive> /dn /mn /s /h /?
where <drive> is an optional parameter specifying which drive to analyze.
      /dn is an optional parameter specifying which BGI driver to use
      /dname specifies a bgi driver by filename (without the .bgi)
      /mn is an optional parameter specifying which driver mode to use
      /s turns off the "/o:s" switch passed to the "dir" command
      /h or /? displays a help screen
Note: the mode (/m) is ignored if a driver (/d) is not specified.
Note: /dname option will not work with the standard Borland driver files
      (such as CGA.BGI or EGAVGA.BGI), but may be used for second-party 
      drivers such as the SVGA16 driver included here.
      Example: dirstats /dsvga16 /m5    will give 1024x768 SVGA video mode
Note: When <ENTER> is pressed with a file type highlighted, a directory of
      these files is displayed.  The directory command defaults to being
      sorted by file size (/o:s).  This switch is not valid for DOS 4 and
      below, and will cause an error message.  To get a directory to work
      in DOS 4 and below, specify the /s option when starting DIRSTATS.

Possible selections for video driver and mode are:

[require CGA.BGI]
/d1 /m0   CGA 320x200 color palette 0
/d1 /m1   CGA 320x200 color palette 1
/d1 /m2   CGA 320x200 color palette 2
/d1 /m3   CGA 320x200 color palette 3 
/d1 /m4   CGA 640x200 monochrome
/d2 /m0   MCGA 320x200x4 color palette 0
/d2 /m1   MCGA 320x200x4 color palette 1
/d2 /m2   MCGA 320x200x4 color palette 2
/d2 /m3   MCGA 320x200x4 color palette 3
/d2 /m4   MCGA 640x200x2
/d2 /m5   MCGA 640x400x2

[require EGAVGA.BGI]
/d3 /m0   EGA 640x200x16
/d3 /m1   EGA 640x350x16
/d4 /m0   EGA64 640x200x16
/d4 /m1   EGA64 640x200x4
/d5 /m3   EGAMONO 640x350x2

[require IBM8514.BGI]
/d6 /m0   IBM8514 640x480x256
/d6 /m1   IBM8514 1024x768x256

[requires HERC.BGI]
/d7 /m0   Hercules 720x348

[require ATT.BGI]
/d8 /m0   ATT 320x200x4 color palette 0
/d8 /m1   ATT 320x200x4 color palette 1
/d8 /m2   ATT 320x200x4 color palette 2
/d8 /m3   ATT 320x200x4 color palette 3
/d8 /m4   ATT 640x200x2
/d8 /m5   ATT 640x400x2

[require EGAVGA.BGI]
/d9 /m0   VGA 640x200x16
/d9 /m1   VGA 640x350x16
/d9 /m2   VGA 640x480x16

[requires PC3270.BGI]
/d10 /m0  PC3270 720x350x2

[requires SVGA16.BGI]
/d16 /m0  SVGA 320x200x16
/d16 /m1  SVGA 640x200x16
/d16 /m2  SVGA 640x350x16
/d16 /m3  SVGA 640x480x16
/d16 /m4  SVGA 800x600x16
/d16 /m5  SVGA 1024x768x16

PROGRAM USE

The program comes up with a pie chart showing the division of disk space 
among files (root), unused space (free), and bad clusters (bad).  

The various elements of the screen are:

Current directory: (Top left corner, first line)
   The directory whose elements are shown on the pie.  Changed using the
   <ENTER> and <BACKSPACE> keys.
Relative directory: (Top left corner, second line)
   The directory to which the pie and the percentage numbers are relative to.
   Changed using the <F3> and <F4> keys.
Pie:
   A graphical depiction of the relative space used by the elements of the
   current directory.  The arrows move the highlighting around the pie.  The
   <ENTER> key makes the highlighted selection the current directory.
Scroll window: (Bottom right corner)
   A list of the elements of the current directory along with the space used
   by each.  The <F2> key toggles the values between bytes and percentage
   of the relative directory.  The arrows move the highlight bar.  The
   <ENTER> key makes the highlighted selection the current directory.
Disk information: (Bottom left corner)
   Displays the size of the disk, bytes free, bytes allocated, and bytes used.
   Note that the size of the disk includes any bad clusters, so if there are
   bad clusters on the disk the number of bytes allocated and the number of
   bytes free will NOT add up to the total number of bytes on the disk.


Valid commands are:
    
    <ENTER>: Select the highlighted directory.  For file extensions, this will
             display a directory of the files.
<BACKSPACE>: Go back to the next higher directory level
Shift-<Tab>: Change the directory to which the pie is relative BACK one
             directory level (towards the full drive).
      <Tab>: Change the directory to which the pie is relative FORWARD one
             directory level (towards the current directory).
      <ESC>: Exit the program
         Q : Exit the program
         X : Exit the program
       <UP>: Move up the list of directories (counter-clockwise on the pie)
     <LEFT>: same as the UP arrow
     <DOWN>: Move down the list of directories (clockwise on the pie)
    <RIGHT>: same as the DOWN arrow
       <F1>: Display the help screen
         H : Display the help screen
         ? : Display the help screen
         P : Toggle the type of display in the scroll window (bottom right
             corner) between percent of relative directory and total number 
             of bytes.
         B : Same as P.
         I : Display disk statistics.
         A : Display a list of the 15 most popular extensions by average size.
         S : Display a list of the 15 most popular extensions by total size.
         C : Display a list of the 15 most popular extensions by count. 


Elements which show up in the pie are:

ALL_CAPS:  A subdirectory of the current directory.  Can be selected using 
           the arrows and the <ENTER> key.
<root>:    The root directory.  This only appears on the full drive pie.
<free>:    Free space.  This only appears on the full drive pie.
<bad>:     Space used in bad clusters.  This only appears on the full 
           drive pie.
<.xxx>:    Space used by files with extension 'xxx', in the current directory.
           The five most popular (by space) extensions are displayed in this 
           way.
<.other>:  Space used by user files (other than those with the five most 
           popular extensions) in the current directory.
<hidden>:  Space used by hidden files in the current directory.
<dir>:     Space used to hold the information about the current directory.
           Each directory entry takes 32 bytes.  Note that this only shows up
           in subdirectories; a fixed amount of space is automatically 
           allocated by DOS for the root directory.  This root directory
           space is allocated outside of the space reported as available on 
           the disk.
<extra>:   Space allocated by DOS which is not actually used by files.  This 
           catagory exists because DOS allocates space to files in blocks.  
           That is, if a file uses only 20 bytes and DOS allocates in blocks 
           of 1024 bytes, 1004 of the bytes are wasted: no other files can 
           use them.
<Other>:   A group of elements that are too small to show individually on the
           pie.  The individual items show up in the scroll window.


If you have any questions, comments, or problems, let me know:

                 Philip VanBaren
                 1845 Lake Lila Dr.  Apt C3
                 Ann Arbor, MI 48105

     Internet:   phillipv@eecs.umich.edu
     Compuserve: 71214,2302
