WASTED.EXE v1.7 (31/10/1996) - written by Tim Jones and Jason Hood Purpose: WASTED was written to quickly traverse a harddrive and report how much diskspace each directory really uses based upon the cluster size. Output: bytes usedbytes usedbytes-bytes percentage where percentage is based upon the report method used. (see below) Syntax: WASTED [directory][spec1[;spec2[;...]]] [parameters] where directory is the directory to start at (default=current directory) specn is the file specification to use (must have * or ?) Parameters: (prefix / and - are valid) /? = This help text /C:n = Sets the cluster size to n (where n > 0) /F = Display each file, with an overall total /NT = Turns off the displaying of the Total line (No Totals) /NS = Selected directory only (No Subdirectories) /P = Pause between screens /R:n = Report using method n n=1 = Wasted percentage based upon disk size n=2 = Wasted percentage based upon used disk space (default) optional parameters may be specified in any order Cluster Sizes: When you specify a cluster size which is different from the actual cluster size, the program "estimates" how many clusters you would actually have if you use the new cluster size. The new "total disk space" may differ from your current total disk space. Report Methods: Of all the mail I received, this was the most mentioned. At least two schools of thought have risen on the subject of how to represent the percentage of wasted space. The first method bases the percentage upon the size of the harddrive. The second method bases the percentage upon the amount of diskspace the files occupy. Given the following scenario: A: is a 1.44M drive (1,457,664 bytes) on A: are two files: A.DAT 513 bytes and: B.DAT 513 bytes Using Report Method #1 you get the following: Cluster size : 512 # of Clusters : 2847 Est. Disk Size: 1457664 Directory Bytesize Realsize Wasted A:\ 1026 2048 1022 0.07% Total: 1026 2048 1022 0.07% Using Report Method #2 you get the following: Cluster size : 512 # of Clusters : 2847 Est. Disk Size: 1457664 Directory Bytesize Realsize Wasted A:\ 1026 2048 1022 49.90% Total: 1026 2048 1022 49.90% With Method #2, you see that the files are wasting almost half of the space which they occupy. With Method #1, you see that the space being wasted is simply a tiny portion of the entire disk. Using Method #1 a large percentage means a large chunk of disk is being eaten by many files in the directory. Using Method #2 a large percentage means that there is 1 or more "wasteful" files in the directory. Either method may be specified by using the /R:n parameter. Special Notes: :I have not tried to run WASTED on a drive, re-partition/format the drive with a new cluster size and compare that with the WASTED program. So don't expect the results to be 100% accurate (although it should be close). :This program does NOT take into account the space used by the File Allocation Table. Each subdirectory consumes at least 1 cluster. As subdirectories become larger, more clusters will be allocated to hold the directory information which could have been used for data instead. :This program does take into account Hidden and System files. :This program will traverse into Hidden subdirectories. :The modification history for this program is included in the sourcecode file. Jason's Notes: I added the commas to the numbers, the /F and /NS switches and the file specifications. You can have as many specs as you want. Due to the way I handle them, a wildcard should be included, otherwise it will be treated as a directory. So to show the wastage of a particular file, a kludge like "thisfile.ext*" will be needed. This is because it's easier than trying to determine if it's a file or a directory, and I think wildcards would be used more often than not, anyway. Report 2 is default (instead of Tim's 1) because that's the one I like. This program is FREE and comes with the Pascal sourcecode. The program and source may be totally "hacked and butchered" to your hearts content. I have tried to thoroughly document the sourcecode so that you may be able to include your own percentage calculations and switch options. Although I have tried to make this program bug free BEFORE releasing it (what a concept!), I cannot guarantee that it will not totally "hack and butcher" your PC. Though WASTED is not updated very often, I always post the latest version to the SimTel Archives (now Coast to Coast Software Repository - Jason). ftp://ftp.coast.net/SimTel/msdos/diskutil/ (Jason) I'll upload to the above as well as to SimTel.Net and Garbo: ftp://ftp.simtel.net/pub/simtelnet/msdos/diskutil/ ftp://garbo.uwasa.fi/pc/diskutil/ I can be contacted via E-mail for questions/suggestions/complaints. My email address is: tjones@wpogate.ssc.nasa.gov (as of 05/17/1996) John C. Stennis Space Center, Mississippi, USA and Jason's email: hoodj@topaz.cqu.edu.au (Yes, an Aussie; that's why the date's 'round the other way. :) )