March 12, 2004
By Karen Kenworthy
IN THIS ISSUE
A lot can change in two years. My nephew Tyler now runs from place to place, bouncing off any object thoughtless enough to be in his way. His alert eyes constantly scan the horizon, searching for the center of any storm he can join, or start. And he's convinced he can talk, though only his Mom and Dad reliably decode his emphatic utterances. :)
New Directory Printer!
Programs can change a lot in two years, too. During the last 24 months I've released seven brand new Power Tools, and updated 15 others at least once. Some, such as the Time Cop, Show Stopper, and the Recycler, have gained small but loyal followings. And others, including the 'Net Monitor, Computer Profiler, and Alarm Clock, have become among the most popular programs anywhere on the 'net.
And don't forget the Directory Printer! It's one of my best known programs, featured in magazines, newspapers, television shows, and radio programs around the world. Every day it travels to far-off places I'll never get to visit, and spends time with people great and small.
Sigh. Can a programmer envy her program? :)
But two years have passed with no new versions of my Directory Printer appearing on the KarenWare.com web site. Why?
Some may have thought this program, born way back in 1997, was simply full-grown. Others may have thought there was nothing more this little program could learn to do.
After all, it already prints the names of any file or folder on a hard disk or CD. If asked, it prints each file's size, date created, date of last modification, and date of last access too. It knows every file's attributes (read-only, hidden, etc.), and will gladly add this data to its reports. And those reports can be printed, or saved to a disk file and later loaded into a database, spreadsheet, or e-mail message.
Still, the venerable Directory Printer had a lot of growing up to do. And, behind the scenes, it's evolved rapidly. Over the last several months my little digital helper has sprouted several new features. It's learned to better master some of its older tricks. And a few old bugs have finally been exterminated.
Yes, I'm proud to announce the new Directory Printer is making its debut!
Old-timers will notice a few changes right away. The program's main window now has three tabs, labeled "Print", "Save", and "Other Settings". Clicking the "Print" tab brings all the print settings into view. Settings only used when saving file and folder information to disk are hidden.
Click the program's new "Save" tab, and everything is reversed. Now only your most-recent settings, used when saving information to a disk file, are on-screen. Finally you can make new selections, without the distraction of unrelated buttons and knobs!
The third tab, "Other Settings", is where you'll find an option to add "Print with DirPrn" to Windows' Folder and Drive context menus (those little menus that pop up when you right-click a folder or drive's icon). This option has been available for a while. But now it has its own special place on-screen, where future options can join it without crowding.
And that's just the beginning. It's easier than ever to select the drive or folder whose information will be printed or saved. The new folder selector displays hidden and system folders, making them as easy to view as their less stealthy brethren. A new checkbox ("Show Network") adds all your network shares to the available selections!
The new Directory Printer even comes with a brand spanking new Help file, containing "screen shots", definitions, and lots of tips. Yes, I still feel like a fish out of water creating those things. But I'm getting used to it. :)
Making a Hash of It
For quite a while, the Directory Printer could compute and print each file's MD5 Hash. As we've seen, complex mathematical formulas, and the file's exact contents, determine this 128-bit binary number. Change just one bit in even the largest file, and the file's MD5 Hash will change dramatically.
Although it's theoretically possible for two different files to have the same MD5 Hash, in practice it just doesn't happen. Thanks to this exquisite sensitivity to differences, an MD5 Hash can be thought of as a file's unique signature or fingerprint. If two files have the same MD5 Hash, their contents are identical too.
MD5 (which stands for Message Digest version 5) is one of the most popular hashing formulas. But it has a very popular rival. Known as SHA1 (Secure Hash Algorithm number 1), this newer formula produces hash values that are 160 bits long.
What difference does this make? Well, there are 340,282,366,920,938,463,463,374,607,431,768,211,455 possible MD5 hash values. That's a lot!
But the larger SHA1 Hash contains 32 more bits. This gives it 4,294,967,296 times as many possible values as the smaller MD5 Hash. All told, there are 1,461,501,637,330,902,918,203,684,832,716,283,019,651,637,575,680 different SHA1 Hash values -- more than the number of atoms in the known universe!
Clearly, SHA1 is too cool to be ignored. That's why the new Directory Printer gives you a choice. The program can print each file's MD5 Hash. Or print its SHA1 Hash. Or print both hashes, or neither. It's entirely up to you.
What's in a Name?
What else can the new Directory Printer print? Here's the complete menu from which you can choose:
Full Name (Path+File Name) - a file or folder's complete name, including drive letter and folder names (the file's "path")
Folder Name - the name of the folder where a file's information is stored.
Name - just the name of the file, without the path information.
Short Name (8.3) - Windows automatically generates an alternate name for each file, one that conforms to limitations of DOS and older versions of Windows. These names contain no more than eight characters, followed by a period ("."), then no more than three additional characters - hence their nickname: the "8.3" name.
Extension - the last portion of a file's name, that follows the period character (".") if any. This portion indicates the type of data stored in a file. For example, files whose names end with ".exe" contain programs. If a file's extension is "txt", the file contains plain text.
File Size - as always, this is the amount of data (in bytes) the file contains.
Disk Space Used - This number will be the same as the "File Size", unless Windows is compressing a file or folder. In that case, it will indicate the compressed size of the file.
Attributes - Previous versions of the Directory Printer reported the value of five file attributes: Read-Only, Hidden, System, Archive and eXecutable. The new Directory printer adds two more: Compressed, and Encrypted.
MD5 hash - The file's 128-bit MD5 Hash value, displayed as a 32-character hexadecimal number.
SHA1 hash - The file's 160-bit SHA1 Hash value, displayed as a 40- character hexadecimal number.
File Version - If the file contains a program, this will be the program's internal version number (for example, 4.0.2). Other types of files don't have version numbers, so this information will be blank.
Date Created - The date and time the file was created.
Date Last Modified - The date and time the file was last changed.
Date Last Accessed - The date and time the file was last accessed, even if that access didn't change the file's contents.
Made to Order
Selecting information the new Directory Printer prints or saves is easy. On the program's main window is a complete list of choices. Just place a checkmark beside each bit of information you need, and the program does the rest.
For example, suppose you want to print a report revealing the name and size of every file on your disk. Just place checkmarks beside "Name" and "File Size". Clear the checkboxes beside the other choices to prevent them from being printed.
Want to control the order your selections are printed or saved too? Look closely, and you'll see new Up and Down buttons beside your selections. These let you sort the entries, moving them up or down within the list.
When printing, each bit of information is shown in the order it appears in your list. So moving a file fact to the top of the list means it's printed first. Next come the choices you've moved to the middle of the on-screen list. Naturally, the tidbit you've sent to the bottom is printed last.
To see this feature in action, place checkmarks beside "Name", "File Size" and "Date Created" in the Directory Printer's list of available information. Now sort the list so the selected items appear in this order:
Date Created File Size Name
That's all there is to it! Click the program's "Print" button. Soon your printer will emit a page with lines like these:
4/6/2003 18:30 12,149 Notes.txt 2/23/2004 17:11 39,072 Family.gif 3/2/2004 18:02 142,557 API.bas
There's a lot more to tell about the new Directory Printer. But it's getting late, so I guess we'll have to wait. Let's get together again soon, OK?
In the meantime, snag a copy of the new Directory Printer. As always, the program is free for personal/home use. Just visit the program's home page at:https://www.karenware.com/powertools/ptdirprn
If you're a programmer, download a copy of program's Visual Basic source code too. You might find the new "Crypto" library (for computing hashes) and new "Folder Browser" user control are pretty nifty. :)
Better yet, get the latest version of every Power Tool -- including the new Directory Printer -- on a brand-new shiny CD. You'll also get three bonus Power Tools not available anywhere else. The source code of every Power Tool, the text of every issue of my newsletter, and some of my original Windows Magazine articles are included too. Owning the CD also grants you a special license to use all Power Tools at work.
Best of all, buying a CD is the easiest way to support the KarenWare.com web site, Karen's Power Tools, and this newsletter! To find out more, visit:
Until we meet again, if you see Tyler, grab him and hold him. His mother won't be far behind. And if you see me chasing Tyler, or on the 'net, be sure to wave and say "Hi!"
November Revenue* $151.18
October $132.59 USD — Thank you!
*Licenses + Donations - PayPal Fees