  DSKWASTE 2.2 (c) Copyright 1998-2000, Irving Maron. All Rights Reserved.
                            
                            DISK WASTE EVALUATOR

(1) System Requirements.
DSKWASTE is a DOS program, requiring MS-DOS Version 5 or later (including the
versions provided with Windows 9x). DSKWASTE results are valid for FAT16 or
FAT32 hard disks or partitions.

(2) Functional Overview.
DSKWASTE measures the waste of hard disk space that results from the
allocation of space to files in units of clusters. The FAT16 and FAT32
cluster size depends upon hard disk partition size in the relationship
shown below:

     Partition (Mbytes)  FAT16 Cluster (bytes)  FAT32 Cluster (bytes)

       16 to < 128              2048                   ----
      128 to < 256              4096                   ----
      256 to < 512              8192                   ----
      512 to < 1024             16384                  4096
     1024 to < 2048             32768                  4096
     2048 to < 8192             -----                  4096
     8192 to < 16384            -----                  8192
    16384 to < 32768            -----                  16384
    32768 to < 65536            -----                  32768

(Note: 1 Mbyte = 1,048,576 bytes)

DSKWASTE can be used to measure the wasted space for a complete drive 
(partition) or for any directory or subdirectory (or even single file) in
the drive. Wasted space computations are based upon all the files actually
present in a selected drive or directory, and can be performed for the
actual cluster size or for any other FAT16 or FAT32 cluster size.

(3) Program Operation Overview.
The program may be run in Command Mode (from the command line) like a DOS
command, or in Menu Mode with on-screen instructions and selections. Command
Mode is useful for taking a quick snapshot or two of the disk waste situation
on a drive. Menu Mode, on the other hand, permits lining up a number of snap-
shots for comparison and evaluation in a log file which can be viewed without
quitting the program.
   
(3.1) Command Mode.
To run Command Mode, enter the following at the DOS prompt:

   [drive:][path]dskwaste targetdrive:[targetpath][targetfilename] [/nnnnn]

The [drive:][path] portion points to the location of DSKWASTE.EXE; the target
drive, path and filename define the specific drive, directory or file for
which disk waste measurements are to be made. The target filespec may be
entered using long filenames (if available) or "8.3" standard DOS filenames
and aliases. Wildcards may be used in the last element of the target filespec.

Results, including the actual cluster size, are printed to the screen. Disk
waste totals are provided separately for short files and for long files, where
short files are files that can fit within one cluster, and long files are
files that require more than one cluster.

Instead of computing the disk waste results for the actual cluster size, an
alternate cluster size can be selected by appending /nnnnn to the command
(where nnnnn is the selected size in bytes). The alternate size must be
selected from the list of defined cluster sizes shown in Section (2). The
additional values 512 and 1024 (not listed above) are also allowed. These are
used for floppy disks (or were used in the case of the 1024). If the choice
is not precise but reasonably close to a defined size, the program will
correct the choice and use the corrected value.

NOTE: Command Mode can evaluate CD-ROM disks if the cluster size is selected.

(3.2) Menu Mode.
To run the program in Menu Mode, enter "[drive:][path]dskwaste" (without the
quotes) at a DOS prompt, and follow the instructions on the screen. You will
be asked to select a drive and/or directory and a cluster size. In the cluster
size selection, the initial size shown in the selection window immediately
after a drive has been selected is the actual cluster size of the drive
(except for CD-ROM drives), but any size may be selected. After the drive and
cluster size are selected, the program makes its measurements, does its
computations and presents its results.

To measure a directory and all its subdirectories rather than a drive or
partition, accept the "Define Directory" option at the "drive:\directory"
selection prompt. Then enter the name of the drive and directory, being
careful to precede the directory name with the complete path to the directory.
(You may also particularize this entry to a single file.) As in Command Mode,
this entry may be composed of long filenames or "8.3" DOS filenames (or both).

NOTE: The program does not accept directories a: or b: for this entry. These
      directories are accepted in Command Mode.

(4) Typical Results.
The following is a printout of typical results for a relatively full, 2 Gbyte,
FAT16 partition with a cluster size of 32768 bytes:

 File Type      Bytes Allocated     Bytes Wasted   % Wasted     No. Files
----------------------------------------------------------------------------
 Short files        313,425,920      241,030,368      76.9        9565 
 Long files       1,767,931,904       87,818,160       5.0        4802 
---------------------------------------------------------------------------- 
 All files        2,081,357,824      328,848,512      15.8        14367

The first data column above, "Bytes Allocated", shows the bytes that have
been assigned to each category of file. Each file does not necessarily use
its full allocation; the unused portion is given in the second data column,
"Bytes Wasted". The third column shows the wasted space as a percentage of
the allocation. The fourth column shows the number of files involved in each 
category.

A repeat computation on the 2 Gbyte partition measured above, but with a 
cluster size of 4096 bytes, as could be achieved with FAT32, results in the 
following:

 File Type      Bytes Allocated     Bytes Wasted   % Wasted     No. Files
----------------------------------------------------------------------------
 Short files         20,955,136       12,858,778      61.4        5116 
 Long files       1,766,010,880       21,851,734       2.0        9251 
---------------------------------------------------------------------------- 
 All files        1,786,966,016       34,710,512       1.9        14367 

By comparing the two sets of results, it is possible to obtain a measure of
the improvement that can be achieved for this case by using FAT32 rather than
FAT16. (The Bytes Allocated would decrease by 294.4 million bytes and the
Bytes Wasted would decrease by 294.1 million bytes. Note that most of the
improvement is obtained from the Short files.)

(5) Advanced Capabilities.

(5.1) Using the Menu Mode Log file.
In order to facilitate comparisons of the type described above, the results
of each session with DSKWASTE in Menu Mode are written to a log file (called
DSKWASTE.LOG), which can be found in the root directory of the drive that is
the current drive when DSKWASTE is running (providing that the current drive
is accessible for writing). You can view this file from within DSKWASTE if
the DOS EDIT program is in a directory included in the autoexec.bat PATH
statement. If so, then load DSKWASTE with the command "dskwaste/v" and
exercise the "view Log" menu choice shown at the bottom of the screen when
results are presented. If you prefer to use a DOS text file viewer other than
DOS EDIT, then identify the viewer by loading DSKWASTE with the command
"dskwaste/v [drive:][path]viewername".

If DSKWASTE is loaded without the "/v" switch, the "view Log" menu item will
be replaced by "DOS Shell" on DSKWASTE's bottom-of-screen menu. "DOS Shell" 
permits you to SHELL to DOS, perform DOS commands, and then resume the 
DSKWASTE session. It is possible to switch from "DOS Shell" to "view Log"
(and toggle back again) by pressing the Alt+V key combination during a
program pause. If "view Log" is enabled in this manner (without having
employed the "/v" switch when loading), the text reader employed will be the
default DOS EDIT.

NOTE: The "view Log" menu item will not be presented in response to the "/v"
      switch or the Alt+V keys if the log file cannot be opened for any
      reason (e.g., if the current drive is a CD-ROM drive or is a floppy
      disk drive that cannot be written to).

(5.2) Changing Screen Colors in Menu Mode.
Press Alt+C at any program pause in Menu Mode to step through the eleven
screen color combinations that are available, or load DSKWASTE with the
screen-color switch, "/nn", where "nn" is a 2-digit number in the range 01
to 11. The program defaults to 01 when the screen-color switch is not used.

NOTE: The "/nn" switch must precede the /v switch, if both are used.

(5.3) Inhibiting Subdirectory Search in Command Mode.
In both Command and Menu modes, the disk waste is ordinarily determined for
all files in the final directory of the filespec and all its subdirectories
(unless the final element of the filespec is a file rather than a directory).
In Command Mode, the extension to all subdirectories of the final directory
may be inhibited by following the filespec by two forward slashes. If a
selected cluster size is also to be employed, then follow the two forward
slashes with the desired cluster size (i.e., //nnnnn).

(6.0) Syntax Summary.

  Command Mode Syntax:
   [drive:][path]dskwaste targetdrive:[targetpath][targetfilename] [[/]/nnnnn]
   /nnnnn - sets cluster size to nnnnn instead of detected value
   //     - no subdirectories included
  Menu Mode Syntax:
   [drive:][path]dskwaste [/?][/nn][/v [[drive:][path]viewername]
   /?  - help screen
   /nn - screen color switch, where nn is 01 to 11
         (or use /m for monochrome)
   /v [[drive:][path]viewername] - view log file from within DSKWASTE
      (If no viewer is specified, defaults to DOS EDIT)
  Commands from active screen in Menu Mode:
   Alt+V - toggle between <view Log> and <DOS Shell>
   Alt+C - change screen colors

                             * * * * * *

DSKWASTE 2.2 is freeware. Permission is granted for unrestricted
noncommercial use. Permission (and payment) for commercial use can be 
arranged by e-mailing the request to irvmaron@compuserve.com.

Irving Maron
Mount Laurel, NJ
July 14, 2000

