Tutorial Thursday

Getting the size of folders in Windows XP has always been way too much of a pain if you ask me. There should be a built-in option to display the folder size much like how file sizes are displayed. The most obvious reason for them not providing such a tool is the length of time at CPU usage it takes to query a folder that contains thousands of files, such as the Program Files folder.

It is super easy to add a column in Windows Explorer that displays the folder size…in fact you can have it setup in under a minute. There aren’t that many steps to getting it done and if you want to save yourself 15-seconds download the utility called Folder Size, install it, and skip to step 3. I, however, prefer to bypass installing a program wherever possible, and this is one instance where it hardly seems necessary to install the program.

  1. Download the DirSize.dll file from this mirror that I setup. If you really want to the file can be downloaded from the DLL’s homepage, but you’ll have to register. After the download is complete, drag the DirSize.dll file to your \Windows\system32 folder:
  2. Next, open up the Run command by going to the Start Menu -> Run and then type regsvr32 dirsize.dll into the box:
    Register DirSize.dll
    After you press “OK” you should receive a confirmation box saying that the DLL was successfully registered:
    DLL Registered
  3. If you have a Windows Explorer window open you should close it and then reopen it. Then, when you’re in the Detailed view just right-click on a header and select Folder Size to add the column.
    Folder Size
    After doing this you should see the new column:
    Folder Size
  4. After you get the column positioned just how you like it, you should go to Tools -> Folder Options -> View and click the button Apply to All Folders. This will ensure that the Folder Size column is displayed every time you use Windows Explorer.
    Folder Options

I would say that the Folder Size works pretty well without straining your computer too much. You might notice folder sizes not showing up the first few times you use Windows Explorer because they do take a little while to calculate. For example, my Program Files folder has 25,000 files totaling 2.9GB and it took 32 seconds to calculate the folder size. However, it does appear to cache these values because the next time I came across that folder the size appeared instantly.

You’ll probably be surprised at the amount of space some of the folders take up on your PC once you have this installed. I managed to find some folders that had old versions of applications I used to install, but they are several years out of date. The only reason I noticed this folder was because I was navigating through Windows Explorer looking for a file and I noticed a 300MB folder. :)