March 10, 2004

DeepSize

Sometime last summer, I saw a cool article on the Code Project called Explorer column handler shell extension in C#.

While I had some desire to see MD5 checksums of certain production files, I was more excited by the idea this article gave me. What if I modified the code to provide a “deep size” column in Explorer that would show the total size of all files in a directory? To me, this is a very useful thing.

So, I went and wrote the thing and it officially became my first C# program… or first C# Class, since I just modified the existing assembly.

I have a pre-built version here, along with my source (which is a modified version of the Code Project original).

Download file

I didn’t find any kind of copyright in the source files, so I didn’t include anything in mine. I hope I didn’t miss anything there and I offer apologies in advance to the original author if I did.

To install it, I like to copy if to my Global Assembly Cache. Just execute:

gacutil /i DeepSize.dll

Then, you need to register the assembly as a COM server via:

RegAsm.exe DeepSize.dll (register the version in your GAC).

You may need to restart explorer by logging out than back in. Once you do, right-click on any explorer file ListView (aside from My Computer and My Network Places) and select “More…”. “DeepSize” and “MD5 Hash” should be new choices.

I exclude certain directories from consideration, since it’s well known that they are big. These are directories “ending” in:

  • “PROGRAM FILES
  • “DOCUMENTS AND SETTINGS
  • “WINDOWS”
  • “WIN98”
  • “WINME”
  • “I386”
  • “WINNT”

When I included those, performance suffered and the other directories I was interested in had to wait until those monsters were calculated.

Feedback welcome. If you want the rest of the Visual Studio files, let me know and I’ll provide them.

Enjoy!

Posted by Nick Codignotto at March 10, 2004 11:55 PM
Posted to Programming

Valid XHTML 1.0!   Valid CSS!