Dec 242017
 
This program will display the amount of disk space that is taken up by each sub-directory under the current directory.
File HOW-BIG2.ZIP from The Programmer’s Corner in
Category File Managers
This program will display the amount of disk space that is taken up by each sub-directory under the current directory.
File Name File Size Zip Size Zip Type
HOW-BIG2.C 23709 5679 deflated
HOW-BIG2.DOC 10368 2360 deflated
HOW-BIG2.EXE 16016 9718 deflated

Download File HOW-BIG2.ZIP Here

Contents of the HOW-BIG2.DOC file








HOW-BIG
version 2.0
by
Rip Toren
POB 674
Columbia, MD 21045
24 May 1987

This really started out as a simple program. It will
display the amount of disk space that is taken up by each sub-
directory under the current directory. It will also display the
percentage of slack space that has occurred due to DOS cluster
sizes.

In addition, the cumulative amount of disk space for all
sub-directorys (the thread) beneath this one is shown. You
should be able to tell where all of your allocated space is
going.

To run the program, there are 2 optional parameters that may
be given after the command name:

>HOW-BIG d v

d = [0|1] Display variant. 0 is the default.
0 = the display shown below. The totals
for the threads are given to the left of
the directory name.
1 = will move the thread sub-totals to
the right of those entries that have
sub-directories under them.

v = [0|1|2|3|4]
Verbosity. 0 is the default.
0 = no additional information
1 = display the disk characteristics
2 = 1 + watch the progress through
directories
3 = 2 + watch search for children and
twins
4 = 3 + allocation as the memory chains
are formed. This can get very long for a
large disk!

Obviously, if you wish to use a Verbosity value, you must
also specify the Display; these are positional parameters.






== PROBLEMS ==
I have had reports that on some disk units the program does
not run correctly (or at all). There is not much that I can do
about that. There is no sneaky assembly code used here. All
values, and movement between directories is done using builtin
Lattice 3.1 calls, which are routines that invoke DOS services (I
peeked at the object modules). If you are receiving strange
results, try using VERBOSITY = 4 and redirect the results to a
disk file for examination ( >HOW-BIG 0 4 > result.lst ).

The process uses a 'depth first' search, which means that
the full depth of the first child directory is processed prior to
going on the next. This is done recursively, down to a nesting
level of 20 children (C:\1\2\3\..\20\). The limit of 20 is
purely artificial, as a check against run-away recursion.

== HISTORY ==

5/26/87 V2
+ corrected display on single sub-directory with no
children.
+ reworked math to use all 'long's. Sometimes there
were strange (very large 1234%) slack percentages.
+ added the second type of display.
+ removed the '0k' when there were no threads under
a directory, as well as the slack display for the
threads.
+ added VERBOSITY, so that anomalous conditions
could be traced.
+ added Logo.

5/ 6/87 V1 original Release









==EXAMPLE 1 ===
>HOW-BIG

HOW-BIG (2.0) Disk Utilization Display
(C) 1986 Rip Toren, POB 674, Columbia MD 21045
Non-commercial distribution authorized (*SHAREWARE*)

This Directory (All Sub-Directories)
dsk spc slack dsk spc
44k 59.4% ( 2532k) C:\MSC
832k 3.5% ( ) BIN
880k 7.3% ( ) LIB
124k 56.1% ( 20k) INCLUDE
20k 79.5% ( ) SYS
8k 17.2% ( 488k) C
280k 21.7% ( 104k) FONTE
24k 26.0% ( ) OBJS
80k 18.2% ( ) LISTINGS
104k 3.1% ( ) BOGGLE
180k 31.8% ( ) STARTUP

==EXAMPLE 2==
>HOW-BIG 1

HOW-BIG (2.0) Disk Utilization Display
(C) 1986 Rip Toren, POB 674, Columbia MD 21045
Non-commercial distribution authorized (*SHAREWARE*)

This Directory (All Sub-Directories)
dsk spc slack dsk spc
48k 61.5% C:\MSC ++(2532k)
832k 3.5% BIN
880k 7.3% LIB
124k 56.1% INCLUDE ++(20k)
20k 79.5% SYS
8k 17.2% C ++(488k)
280k 21.7% FONTE ++(104k)
24k 26.0% OBJS
80k 18.2% LISTINGS
104k 3.1% BOGGLE
180k 31.8% STARTUP







==EXAMPLE 3 ==
>HOW-BIG 1 1
HOW-BIG (2.0) Disk Utilization Display
(C) 1986 Rip Toren, POB 674, Columbia MD 21045
Non-commercial distribution authorized (*SHAREWARE*)

Bytes per sector : 1024
Sectors per cluster: 4
Bytes per cluster : 4096
Clusters per drive : 9693
Free clusters : 2932

This Directory (All Sub-Directories)
dsk spc slack dsk spc
52k 63.5% C:\MSC ++(2532k)
832k 3.5% BIN
880k 7.3% LIB
124k 56.1% INCLUDE ++(20k)
20k 79.5% SYS
8k 17.2% C ++(488k)
280k 21.7% FONTE ++(104k)
24k 26.0% OBJS
80k 18.2% LISTINGS
104k 3.1% BOGGLE
180k 31.8% STARTUP

==EXAMPLE 4 ==
>HOW-BIG 1 3

HOW-BIG (2.0) Disk Utilization Display
(C) 1986 Rip Toren, POB 674, Columbia MD 21045
Non-commercial distribution authorized (*SHAREWARE*)

Bytes per sector : 1024
Sectors per cluster: 4
Bytes per cluster : 4096
Clusters per drive : 9693
Free clusters : 2930

PROC_DIR passed name = [MSC ], getcd =
Add sub-dir [BIN ] to [MSC ] as child
Add sub-dir [LIB ] to [MSC ] as child
Add sub-dir [INCLUDE ] to [MSC ] as child
Add sub-dir [C ] to [MSC ] as child
Add sub-dir [STARTUP ] to [MSC ] as child
PROC_DIR [MSC ] looking for child. current dir =
has child named [BIN ]
PROC_DIR passed name = [BIN ], getcd =
PROC_DIR [BIN ] looking for child. current dir =
PROC_DIR [BIN ] looking for twin. current dir =
has twin named [LIB ]
PROC_DIR passed name = [LIB ], getcd =
PROC_DIR [LIB ] looking for child. current dir =





PROC_DIR [LIB ] looking for twin. current dir =
has twin named [INCLUDE ]
PROC_DIR passed name = [INCLUDE ], getcd =
Add sub-dir [SYS ] to [INCLUDE ] as child
PROC_DIR [INCLUDE ] looking for child. current dir =
has child named [SYS ]
PROC_DIR passed name = [SYS ], getcd =
PROC_DIR [SYS ] looking for child. current dir =
PROC_DIR [SYS ] looking for twin. current dir =
PROC_DIR [INCLUDE ] looking for twin. current dir =
has twin named [C ]
PROC_DIR passed name = [C ], getcd =
Add sub-dir [FONTE ] to [C ] as child
Add sub-dir [BOGGLE ] to [C ] as child
PROC_DIR [C ] looking for child. current dir =
has child named [FONTE ]
PROC_DIR passed name = [FONTE ], getcd =
Add sub-dir [OBJS ] to [FONTE ] as child
Add sub-dir [LISTINGS ] to [FONTE ] as child
PROC_DIR [FONTE ] looking for child. current dir =
has child named [OBJS ]
PROC_DIR passed name = [OBJS ], getcd =
PROC_DIR [OBJS ] looking for child. current dir =
PROC_DIR [OBJS ] looking for twin. current dir =
has twin named [LISTINGS ]
PROC_DIR passed name = [LISTINGS ], getcd =
PROC_DIR [LISTINGS ] looking for child. current dir =

PROC_DIR [LISTINGS ] looking for twin. current dir =

PROC_DIR [FONTE ] looking for twin. current dir =
has twin named [BOGGLE ]
PROC_DIR passed name = [BOGGLE ], getcd =
PROC_DIR [BOGGLE ] looking for child. current dir =
PROC_DIR [BOGGLE ] looking for twin. current dir =
PROC_DIR [C ] looking for twin. current dir =
has twin named [STARTUP ]
PROC_DIR passed name = [STARTUP ], getcd =
PROC_DIR [STARTUP ] looking for child. current dir =
PROC_DIR [STARTUP ] looking for twin. current dir =
PROC_DIR [MSC ] looking for twin. current dir =
This Directory (All Sub-Directories)
dsk spc slack dsk spc
60k 64.0% C:\MSC ++(2532k)
832k 3.5% BIN
880k 7.3% LIB
124k 56.1% INCLUDE ++(20k)
20k 79.5% SYS
8k 17.2% C ++(488k)
280k 21.7% FONTE ++(104k)
24k 26.0% OBJS
80k 18.2% LISTINGS
104k 3.1% BOGGLE
180k 31.8% STARTUP


 December 24, 2017  Add comments

Leave a Reply