[Home] [Downloads] [Search] [Help/forum]

TreeInfo

A utility to find the size of directories (folders).


Purpose

This utility was written to simplify cleaning up hard disks (and network drives) by making it easy to find which directories occupy the most disk space. Unfortunately, using the Windows Explorer you can only find out directory sizes one-by-one (by getting the properties of each directory).

The program takes a specified starting point (eg. C:\GAMES) and then scans that directory and all subdirectories (and sub-subdirectories and so on), calculating the amount of disk occupied by all files it finds.

It then lists the size of the files and directories in the starting directory. (See example below).

For each directory it lists the size and number of files in that directory (including subdirectories). In the case of files the size only is listed (in this way you can tell the difference between directories and files).

At the end of the listing is a line stating the total size of the nominated starting directory.

As the sizes are specified at the start of the line you can use the SORT command to sort the results into smallest to largest directory.


Usage

TREEINFO [starting_directory]

If no starting-directory is specified, the default is C:\

eg.  TREEINFO C:\GAMES

Saving results to a file

To direct output to a file for viewing or sorting, use the ">" symbol, as follows:

TREEINFO [starting_directory] > output_file

eg.

TREEINFO C:\GAMES > JOHN.TXT

Sorting results

To sort output, you can "pipe" the results from TREEINFO into SORT, as follows:

TREEINFO [starting_directory] | SORT /R > output_file

eg.

TREEINFO C:\GAMES | SORT > bill.txt

The /R option for the SORT utility sorts into reverse order, so that the directories taking the largest disk space appear first.

(The "pipe" symbol is the "vertical bar" which is probably on the "backslash" key on your keyboard).


Example

treeinfo office95

produces the following:

[TREEINFO Version 1.00 Gammon Software Solutions]
   41.471 Mb    159 files  office95\Access
    1.531 Mb     14 files  office95\Clipart
   10.422 Mb     37 files  office95\Excel
    0.000 Mb               office95\Microsoft Access.lnk
    0.000 Mb               office95\Microsoft Binder.lnk
    0.000 Mb               office95\Microsoft Excel.lnk
    0.000 Mb               office95\Microsoft Office Setup.lnk
    0.000 Mb               office95\Microsoft Office Shortcut Bar.lnk
    0.000 Mb               office95\Microsoft PowerPoint.lnk
    0.000 Mb               office95\Microsoft Schedule+.lnk
    0.000 Mb               office95\Microsoft Word.lnk
    0.000 Mb               office95\MS Access Workgroup Administrator.lnk
    0.000 Mb               office95\MSCREATE.DIR
    3.068 Mb     69 files  office95\Office
   11.415 Mb     28 files  office95\Powerpnt
    3.189 Mb     51 files  office95\Schedule
    0.031 Mb      6 files  office95\Sounds
    6.963 Mb    129 files  office95\Templates
   14.448 Mb     65 files  office95\Winword

   92.540 Mb    568 files  office95  (total)

Sorted example

treeinfo office95 | sort /R

produces the following:

[TREEINFO Version 1.00 Gammon Software Solutions]
   92.540 Mb    568 files  office95  (total)
   41.471 Mb    159 files  office95\Access
   14.448 Mb     65 files  office95\Winword
   11.415 Mb     28 files  office95\Powerpnt
   10.422 Mb     37 files  office95\Excel
    6.963 Mb    129 files  office95\Templates
    3.189 Mb     51 files  office95\Schedule
    3.068 Mb     69 files  office95\Office
    1.531 Mb     14 files  office95\Clipart
    0.031 Mb      6 files  office95\Sounds
    0.000 Mb               office95\MSCREATE.DIR
    0.000 Mb               office95\MS Access Workgroup Administrator.lnk
    0.000 Mb               office95\Microsoft Word.lnk
    0.000 Mb               office95\Microsoft Schedule+.lnk
    0.000 Mb               office95\Microsoft PowerPoint.lnk
    0.000 Mb               office95\Microsoft Office Shortcut Bar.lnk
    0.000 Mb               office95\Microsoft Office Setup.lnk
    0.000 Mb               office95\Microsoft Excel.lnk
    0.000 Mb               office95\Microsoft Binder.lnk
    0.000 Mb               office95\Microsoft Access.lnk

From this you can easily see that Access is taking the most space inside Office95 directory.


Availability

To download, click on the "downloads" button at the top of this page.


Fee

This program is supplied free of charge. It is copyright 1998 by Nick Gammon. Source code is available from the downloads area.


[Back] [Home]
Written by Nick Gammon - 5K

Comments to Gammon Software support

[Best viewed with any browser - 2K]    Internet Contents Rating Association (ICRA) - 2K    [Hosted at HostDash]

Page updated on Wednesday, 15 December 2004