May 20, 2003

By Karen Kenworthy

IN THIS ISSUE

Wow! It's been an interesting few days. A record number of thunderstorms and tornadoes have passed through the area recently. More than once I thought the secluded Power Tools workshop might become a little too secluded.

Fortunately, other than a five-hour power outage, the workshop passed through the storms unscathed. Looks like I won't be visiting the Wizard of Oz this spring after all. :(

Oh well, there's no place like home ...

Colorful Logs

The last time we got together, we talked about two new features added to "Karen's Replicator". We learned that the popular file and folder backup program can now be told which files to skip, in addition to which files to copy. It can also be given certain days off -- days of the week when particular jobs will not run.

As always, the new Replicator keeps a sort of electronic diary, recording events in the program's life in a disk file named "replicator-log.txt". When a group of folders and files are copied, an entry is made in this "log" showing the time the work was performed, the number of files copied, and a whole lot more. The log also records each failure to copy a selected file, and the reason for that failure.

The Replicator's log contains lots of important information. But, as many readers have pointed out, it makes for dull reading. It's sometimes difficult, among the log's hoard of statistics and messages, to locate a single valuable nugget. Important messages about files that could not be copied, or destination disks that were full, sometimes got overlooked.

The solution to this problem seemed simple: just color-code the Replicator's log file. Error messages could be displayed in attention- getting red. A soothing green could be used for messages that report a successful job. And routine text could appear in standard, unobtrusive black.

But the Replicator's diary is stored in what computer-types call a "Plain Text File". As the name suggests, these files are plain, with no ornamentation or fancy stuff like fonts and colors. These files contain characters, but no clues to how their text should be displayed.

Fortunately, programmers have come up with another type of text file. The data in these files is organized in what my beanie-wearing colleagues call "Rich Text Format" (RTF). In addition to the characters to be displayed, RTF files contain information such as typeface (font name), font size, and color.

Handy? You bet. The new Replicator takes advantage of these capabilities, storing its log in Rich Text Format. The name of the log file remains the same. But inside, the new log file is very different. Its information is now displayed using a clearer, and slightly larger, font. And best of all, the new log appears in living color!

Note: Users of previous versions of the Replicator must erase their current log file (using the "Erase Log" button on the "View Log" window) before seeing this new feature in action. That's because RTF files require a "header", a bit of unchanging information at the beginning of the file. Older log files don't have this information, but the new Replicator adds this header to each new log file it creates.

Take Command

We've talked a lot about command lines recently. They allow our favorite applications to be launched without a mouse. We simply type the program's full name, including the drive and path where it resides, followed by a few bits of additional information telling the program what to do.

Command lines also allow one program to run another. For example, Karen's Show Stopper, which can shut down Windows, can be ordered to run one or more programs just before Windows stops. All it needs are the programs' command lines.

So it's probably no surprise that the new Replicator can be run via a command line. Now, when you launch the program, you can specify one or more "jobs" as part of the command line.

For example, to launch the Replicator and run the jobs "My Documents" and "Daily Files" you might use a command line that looks like this:

    C:\Replicator\PTReplicator.exe "My Documents" "Daily Files"

Pretty simple, eh? But I need to add a couple of things. First, your copy of the Replicator is probably stored in a different location. Be sure to substitute your copy's location for "C:\Replicator\PTReplicator.exe" in my example.

Also, notice the quotation marks (") surrounding the job names? These are necessary whenever a job name contains a space character. If no spaces appear in the name, the quotation marks are optional.

Put It On The Desktop

Now that the Replicator understands command lines, it's possible to create a desktop shortcut icon that runs one or more jobs. You could create these shortcuts yourself. But why bother? The new Replicator can do this job for you automatically!

Start by clicking the new "Save Shortcut to Job(s)" button on the Replicator's main window. You'll see a new window, listing all of your Replicator jobs. And beside each job's name you'll find a checkbox.

Next, place a checkmark beside those jobs the new shortcut should run. For example, to create a shortcut that runs the two jobs "My Documents" and "Daily Files", place checkmarks beside those two job names.

Now bring it on home. Click the "Save Shortcut" button at the bottom of the Window. When asked, select a name and location for the new shortcut.

That's all there is to it! You have a brand new shortcut that, when double-clicked with your mouse, automatically launches the Replicator, orders it to run the selected job(s), and then tells the program to quietly disappear!

Incidentally, if you select several jobs for the same shortcut, you may run afoul of a little-known Windows limitation: Command lines must not contain more than 260 characters. If you accidentally create a command line longer than this limit, the intended program may not be launched, or may not run correctly.

That's why, before saving your new shortcut, the Replicator calculates the length of the shortcut's command line (the full path of the Replicator program, plus the names of each job to be run). If it exceeds Windows' limit, you'll see a message informing you that "Your Shortcut's Command Line is Too Long." To work around this limitation, either divide the jobs into more than one shortcut, or give your jobs shorter names.

OK! Want to give the new Replicator v2.0 a try? It's easy. Just visit the program's home page at:

    https://www.karenware.com/powertools/ptreplicator

As always, the program is free (for personal use). Programmer-types can download the program's free Visual Basic source code too!

Or if you prefer, get the latest version of every Power Tool, including the new Replicator, on CD. The disc also includes three bonus Power Tools, not available anywhere else. You'll find every back issue of my newsletter, and a few articles, in the CD's library. The CD even includes a special license that lets you use your Power Tools at work.

Best of all, buying a CD is the easiest way to support the web site and this newsletter. To find out more about the CD, visit:

    https://www.karenware.com/licenseme

What's that? Uh oh, it's Auntie Em. Toto and I have to go! But we'll talk again real soon. Until then, if you see me on the 'net or on the Yellow Brick Road, be sure to wave and say "Hi!"

YouTube button
Downloads Today: 54
More than 6000 downloads monthly
Received $161.04 this month* — Thanks!

License for Work

A license is required to use any or all of these tools for your work. You only need one per lifetime. If you make money with Karen's software, read her license agreement.

License for Work $25

Donations + Other Ways

Power Tools Newsletter

November 1st, 2023:

  • What is Karen's QR Code Talker?
  • What is a QR code?
  • What is a Code Talker?

List of All Issues since '99

24836 Verified Subscribers

Subscribe to receive new issues of the newsletter about Karen and her free Power Tools.

Click here to Subscribe

November Revenue* $161.04
*Licenses + Donations - PayPal Fees
Oct $211 Sep $166 Aug $173 Jul $225 Jun $324 May $200 Apr $700 Mar $273 Feb $405 Jan $56 (2023) Dec $349 Nov $546 Oct $253 Sep $232 Aug $189 Jul $379 Jun $188 May $484 Apr $212 Mar $519 Feb $89 Jan $462 (2022) Dec $1088 Nov $151 Oct $133 USD — Thanks again!