[Home] [Puzzles & Projects] [Delphi Techniques] [Math Topics] [Library] [Utilities]
It is occasionally useful to look a the largest files on a drive while doing housecleaning chores. Here's a program that will display a sorted list of a specified number of the largest files on a user selected hard drive regardless of the folder structure.
For programmers, items of potential interest include:
Addendum April 30, 2007: Colin K. just reported that file sizes for very large files (greater than maximum 32 bit integer size, about 2.1GB) caused the program to abort. It turns out that Borland changed the file size field to 64 bit integer sometime after Delphi 5 so large files compiled with a late version can have the abort problem. For the version I use, D5, the program just reported negative file sizes in those cases. It turns out that even in D5, the full size is available by combining two 32 bit integer fields from an extension area of the file information record. That fix was applied today. As usual when revisiting a program, I made a few other changes.
Addendum November 10, 2008: At a user's request, Version 3 was posted today which adds "last Modified Date" to the displayed information. A new button was also added which saves the list of large files as a Comma Separated Value, CSV, file. It is simple to import this file into Excel where it can easily be re-sorted by date, stamp or filename.
Addendum February 10, 2009: One of the last two updates seems to have broken some of the features of the program. Namely file name data was incomplete when clicking a file to open its folder, and when formatting to create the CSV (Comma Separated Values) file. In any event, Version 3.1 posted today seems to have fixed those problems, hopefully without introducing any new ones J.
August 16, 2011: If reporting of file sizes greater than 4 GB ever worked, it got broken somewhere along the line. That got fixed today with version 3.3.
Running/Exploring the Program
Copyright © 2000-2013, Gary Darby
All rights reserved.