Click here to Skip to main content
13,357,380 members (68,883 online)
Click here to Skip to main content
Add your own
alternative version


78 bookmarked
Posted 19 Nov 2003

Folder Size Information in the Windows Explorer Details View

, 18 Aug 2010
Rate this:
Please Sign up or sign in to vote.
This code displays the folder size information in the Explorer's Details view.
Sample Image - DirSize.jpg


In day to day life, when one wants to know the size of a folder, (s)he has to right click on the folder name and has to choose the Properties. Using this DLL, one can view the folder size as one of the columns of the Explorer as shown in the image. We also have the facility to sort according to the folder size. (I did not do anything to sort, it is done by Explorer. :))

This class implements the Shell interface called IColumnProvider. Using this interface, one can customize the Explorer's Details view. This class adds one more column to the Details view, which displays the consolidated folder size.

To build this project, you must install Microsoft Platform SDK, or click here [53.5 KB] to download SHLOBJ.h.

How to Use the DLL

Well, if you build the project, you need not do anything, since the IDE automatically registers the DLL. If demo project is downloaded, then unzip the DLL and register it using the command "regsvr32 <Path of the unzipped DLL>". E.g., Regsvr32 c:\DirSize.DLL, if the DLL is present in C:.

Scope for Further Improvements

This code can be modified to display the number of files/folders in the folder. Or maybe, you can pack two more classes to display columns for number of files and number of folders into the same DLL to do so.

Performance Issues

When the user selects the "Folder Size" item from the Explorer context menu, the Explorer starts calculating the folder size by traversing all the files and nested folders. First time, it might take some minutes depending upon the contents of the folder. But all the operations are done in the background (Explorer is smart enough!.. Ehh). So this won't stop you from traversing through other files.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Sharan Basappa
Team Leader
India India
He is a graduate, currently working as a Software Engineer in Bangalore, India. You can reach him at

You may also be interested in...


Comments and Discussions

GeneralNew DLL uploaded Pin
Sharan Basappa18-Aug-10 18:55
memberSharan Basappa18-Aug-10 18:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.180111.1 | Last Updated 18 Aug 2010
Article Copyright 2003 by Sharan Basappa
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid