|
[Home] [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.
Running/Exploring the Program
|
|
[Feedback] [Newsletters (subscribe/view)] [About me]Copyright © 2000-2008, Gary Darby
All rights reserved.
|