spacer graphic spacer graphic x10icon graphic [Bar]


Expanding Expander's Horizons

 

Just about anyone who uses the BeOS for any length of time ends up using Expander, the BeOS' archive decompression tool. What many people don't realize is that Expander is just a pretty interface to command line tools, with built-in rules for using the most common tools included with the BeOS. Because there are a plethora of command line tools that handle most of the different compression and archive formats out there, Expander can handle most things you throw at it.

But, there are files which Expander cannot currently handle, either because a built-in rule does not exist to handle a less-common situation, or because there is no corresponding command line tool that can handle the archive format (such as the Mac's BinHex or StuffIt archives). You'll know these files when Expander shows nothing in the Source and Destination fields of its window when you open the archive with it, and the Expand button will be inactive (grayed out).

Fortunately, Expander was designed to be flexible. You can create additional rules that tell Expander how to handle unusual situations or to control new tools that you acquire. It's easy to do, just by adding a single line to a text file, for each new tool or situation. Very cool!

Here's how to do it:

  1. Duplicate the file /home/config/etc/expander.rules.sample, and rename it expander.rules (leaving it in the same folder).

  2. Open the file using StyledEdit, or your favorite text editor.

    The file itself contains excellent instructions and examples for how to add new rules. So, we'll just give you an example of a useful new rule to add.

  3. At the bottom of the file, add the following on a line all by itself:

    ""<TAB>.exe<TAB>"unzip -l %s"<TAB>"unzip -n %s"<RETURN>

    Editing Expander's Rules

  4. Close the file, saving your changes.

  5. If Expander is running, be sure to quit it, so it will notice the changes to its configuration file.

Congratulations, Expander is now ready to do your bidding with the new rule. You may have to hold down the Control key and drag archives of your new type onto Expander's icon in order to get Expander to open it, but once Expander has opened it, you'll find that Expander knows how to look inside the archive, will have information in the Source and Destination fields, and will not have the Expand button grayed out. In other words, you just made Expander smarter!

Next week, a reason for our unreason, or an answer to the question "What is this good for, anyway?"


Copyright © 1999 by Be, Inc. All rights reserved. Legal information (includes icon usage info).
Comments, questions, or confessions about our site? Please write the Webmaster.