View folder sizes at a glance with TreeSize

Every time you give a user a larger hard drive, the user will fill it up. When it comes time to figure out where all of the space went, you'll probably need help. TreeSize can give a quick snapshot of directory sizes.

As hard drive sizes grow, the amount and size of files on those hard drives also grow. You put larger hard drives on your users' computers and they fill them right up, and then come back asking for more space. Though it once seemed inconceivable, brand new multigigabyte drives run out of space and you're left wondering what happened to it all. But if you use the TreeSize utility, you can quickly view how much space is being consumed by directories on your users' systems.

What is TreeSize?
You can find out how much space a file is taking on a workstation by either doing a directory from a command line or by using the Details view in Explorer. But what about directories on hard drives?

To view how much space directories take, you have two complicated choices. First you can run dir /s on a directory and wait until the command completes to see how much space a directory consumes. Or second, you can right-click a folder in Explorer and select Properties. The Properties window will then tally the number of files in the directory and how much space the total directory consumes, as shown in Figure A.

Figure A
One way to total a directory size is by viewing the Properties screen from Explorer.

Although either method is good if you want to check an individual directory, if you want to get a quick glance for all of the directories on a hard drive, you're out of luck. That's where TreeSize comes in. TreeSize is a mailware program that can display directory sizes for every directory on your hard drive.

Mailware vs. freeware
In case you've never heard of it before, mailware is similar to freeware or shareware. Rather than actually having to pay for a piece of software, you merely drop a postcard or letter to the author and let them know where you are and what version of the program you're running. You can still freely download and distribute the program just like regular freeware.

Obtaining and installing TreeSize
You can obtain TreeSize directly from JAM Software, the company that creates and distributes it. The current version of TreeSize at the time of this article is TreeSize 1.7. Click the download button to download TreeSizeSetup.exe, the TreeSize Setup Wizard. The file is only 683 KB in size, so it will download very quickly.

After you've downloaded the file, execute it. TreeSize installs using a traditional Windows Setup Wizard. Just follow the onscreen instructions, accepting the defaults or changing the selections to your liking. TreeSize will run on Windows 9x, NT, 2000, and XP workstations.

Running TreeSize
You can start TreeSize several different ways. First, you can start the program by going through the Start menu, clicking Start | Programs | TreeSize | TreeSize. Another way to start TreeSize is from the QuickLaunch bar, but to use this option, you'll need to have chosen the QuickLaunch bar as a startup option during the Setup Wizard or dragged an icon to it later.

The final way to start TreeSize is to right-click the directory or drive you want to size and select TreeSize. As a basis of comparison with Figure A, this is the choice I'm going to use as an example for this article. Doing so displays the screen shown in Figure B.

Figure B
TreeSize can display the total space taken by files in directories.

You can change how TreeSize displays information by making selections from the toolbar or from the View menu. By default, TreeSize displays the Total Bytes Allocated. This combines the actual size of the files along with the slack space the files may consume. Other views you can choose from the View menu include:
  • Size—Displays the size of the files in the directories, not counting slack space
  • Percent—Quickly displays the percentage of the total disk taken up by the directory and subdirectories
  • Wasted Space—Displays the slack space lost in the directory (Slack space is that space that's unusable and lost by files due to limitations of the file system. For example, if a disk cluster is 1024 bytes in size and you store a file that is only 512 bytes long, the file system still allocates a full 1024 bytes for the file, wasting the balance.)

Additionally, you can sort the directories and subdirectories from the Sort menu based on size or filename.

Wait…that doesn't add up
You've probably noticed that Figure A and Figure B disagree about the amount of space taken up by the Documents And Settings folder on my workstation. Figure A claims that the folder consumes 4,942,355,967 bytes while Figure B claims that the same folder consumes 4,763 megabytes.

In reality, both figures are saying the same thing. The figures are just going about it different ways. Figure A is showing the actual number of bytes consumed by the files. TreeSize, in Figure B, displays the number of megabytes consumed by the files along with the slack space that the files consume.

It's easy to forget that there are actually 1,048,576 bytes in a megabyte (1024 * 1024). Because you probably think in terms base 10, you probably sometimes think of a megabyte as 1000*1000. Here, when you actually multiply the 4,763-MB figure reported by TreeSize by 1,048,576, you wind up with a figure of 4,994,367,488. This still leaves a difference of 52,011,521 bytes.

That's where the slack space comes in. On my test system, when I select View | Wasted Space, TreeSize displays a value of 50,726 KB in wasted space. This time, TreeSize is using kilobytes, so if you multiply the 50,726 value by 1024, it results in a value of 51,943,424 bytes.

Where's the rest? The resulting 68,097 bytes are actually a result of the temporary files created while producing this article that appeared between screenshots.

Get more for your money
JAM Software also offers a commercial version of TreeSize called TreeSize Professional. JAM recommends TreeSize Professional for most support techs because it includes a few additional features including:
  • The ability to view NTFS file compression ratios.
  • Bar and pie charts to represent usage.
  • The ability to scan multiple folders at the same time.

Unlike TreeSize 1.7, TreeSize Professional costs money. You can purchase TreeSize Professional directly from the JAM Software Web site. Whichever version you choose to use, TreeSize is a great tool for support techs who want to help users get a handle on the clutter on users' hard drives.

Editor's Picks

Free Newsletters, In your Inbox