December 6, 1999
By Karen Kenworthy
IN THIS ISSUE
I hope my mother doesn't read this. Just between us, later today a young man is coming to my secluded Power Tools workshop. If all goes well, before the evening is over, I'll have introduced him to a mysterious world he's never know before.
Yes, I'll be telling him about the Java programming language. He's in college. With his final exam is coming later this week, he wants a little tutoring. I've known Jeff all his life. In fact, as he reminded me the other day, I was programming computers before he was born. Sweet boy.
But before you jump to conclusions, I'm not corrupting this young man. He signed up for the Java class before ever talking to me about it. And he's not studying to be a computer programmer. This is just an elective course on his way to a degree in Finance. Despite this little detour, he should have a full, normal life. :)
Directory Printer Update
But I'm not so lucky. As usual, I spent most of the last week working on several computer projects. This week, one of the more interesting projects was an update to the venerable Winmag.com Directory Printer.
Since its introduction in 1997, the Directory Printer has remained one of the most popular Power Tools. That's because, to this day, Windows doesn't provide a simple way to print the names of files on your hard disks and diskettes. That's what the Directory printer does. Select a drive or directory, and it prints the names of all the files it finds there. Options let you tell the Directory Printer to also print each file's size, date and time of last modification, and attributes (read-only, hidden, system, etc.).
Despite its popularity, plenty of folks have suggested ways to improve the original Directory Printer. Most often, people ask for a way to divert its report to a disk file, so the information can be analyzed or manipulated later. In one of my first newsletters, I mentioned a workaround (installing a text/generic printer driver, then using it to print to a file). But for several reasons that solution wasn't completely satisfactory.
The new version of Directory Printer (version 2.1) now properly supports printing to disk. Ask it to print a report, and it displays the familiar Windows print dialog as before. But now that dialog sports a checkbox labeled "Print to file". Place a checkmark there, click "OK", and you'll see a standard Windows Save dialog, letting you select the file where the report will be stored.
The disk files Directory Printer creates can be easily imported into spreadsheets, word-processors, and other documents and programs. That's because columns of information are separated by tabs, rather than spaces. And the disk versions of Directory Printer's reports have no column headings or page breaks that can confuse other programs.
Directory Printer's printed output has been improved too. Columns of data can still appear a bit ragged, especially when very long filenames re printed, or you select a proportional font. But the alignment of columns is now much better, making the report easier to read.
I added one other feature, requested by a few readers. Now, you can order Directory Printer to list only files, only directories, or both files and directories. I'm not sure how this feature will be used. But it is interesting to see your computer's directory structure without the clutter of thousands of filenames. And a listing of files, only, could be used to find duplicate files scattered among your computer's many directories. If the past is any guide, I'm sure several folks will discover uses I've never thought of.
I updated Karen's Snooper last week too. This program silently watches your computer's comings and goings, recording each program's arrival and departure in a log file (named snoop.log). Later, you can analyze this file to discover what programs were run on your computer, when they ran, and how long they took to do their job.
Because the Snooper works behind the scenes, many new users didn't realize it's running. When they tried to start the program again, they were unknowingly launching a second copy. The result was "Error 70, Permission Denied", and a confused user.
The error message appears because Windows does not allow two programs to write to the same file, at the same time. Since the first copy of Snooper, running invisibly, is already writing information to the snoop.log file, the second Snooper's attempt to write to that file is denied. Unsure of the reason, the second Snooper displayed the standard Windows error message dialog, then stops.
The new Snooper, version 1.4, partially solves this problem. Now, when a second copy of the Snooper is launched, it silently terminates, displaying no messages. It's not a perfect solution, since new users may still assume Snooper isn't running and try to launch it again.
A better solution is in the works. Soon, I hope to roll out Snooper 2, which will introduce a new user interface and several nifty features. But for now, at least, new users won't see a scary error message.
While I was making changes, I also added two new command line parameters to Snooper 1.4. If you launch the program from a shortcut, you can now edit the Snooper shortcut's properties to add either "/lock" or "/about" to the program's command line. The /lock parameter causes Snooper to allow other programs to read its log file while Snooper is running (they still can't write to it though). And the /about parameter asks Snooper to display its shiny new About dialog, where you can see the version of Snooper you're running.
Countdown Timer Too
I also updated the Countdown Timer's source code available on my web site (https://www.karenware.com/powertools/ptcount2). I recently enhanced the timer so it appears as a tiny "System Tray" icon when not displaying its main window. But inadvertently, I omitted the SYSTRAY.BAS source code file that showed how the Timer learned this little trick. The new source code archive, now at my site, includes this file.
Before I go, I've just -got- to pass along something I learned last night. It turns out that Bill Gates and Jesse Ventura ... Oops! There's the doorbell. Gotta go. Jeff and his mom are early. Hope you have a great week. And don't forget -- if you see me on the 'net be sure to wave and say hi!