$#KWilbur's Mission
Wilburs mission is to help you find things in all those files you accumulate on your hard disk.
He does this by creating an index of all the words in a given set of files that you define, For instance you might want an index of all the *.txt, *.doc and *.wri files on your C drive. Once the index is prepared, Wilbur can quickly show you a list of all the files containing any word or group of words. He can also show you a view of the sought after words in context in any file selected.
In addition to simple word searches, Wilbur allows word descriptions to contain wild cards and simple logical expressions. Wilbur can even index the files inside Zip archives on your disk.
You can also configure most word processors and program development environments with hot keys that automatically start a Wilbur search for the word under the cursor.
Please note that Wilbur is a Win32 program and will only run on the Intel version of WinNT (3.5 or higher) and Win95. It will not run with the Win32s extensions for the 16 bit Windows.
$ # K Evaluation Copy Limitations
An unregistered evaluation copy of Wilbur has no functional limitations, but you will no longer be able to save indexes once the 30 day evaluation period expires. Also indexes saved by another unregistered installation cannot be read, but all indexes created by the current installation or by a registered copy can be read even after the evaluation period expires. When Wilbur is registered it will once again be able to read and save all the indexes.
$#KWilbur's Display
Wilbur uses a simple two pane window to display his results. On the top is a list of filesfile_list that meet the current search criteria. If the search criterion is blank, then this list will contain all of the files in the index.
When a file is selected from the file list, a text representation of this file is shown in the file contents panepane_view underneath the file list and the first occurrence of a search word will be highlighted. Wilbur does not attempt to do anything beyond basic formatting of this text, but double clicking on the file name in the list will launch the file in its associated application and right clicking in the contents pane will launch QuickView.
You can change the amount of area assigned to each pane by using your mouse to point at the divider between the two panes, and then pressing and holding the left mouse button while dragging the divider to the desired position.
At the top of the screen Wilbur has a standard Windows menu bar.
The Edit menu menu_edit is used to copy text from the view pane to the clipboard
The Index menumenu_index is used to maintain an index.
The Search menumenu_search is used to search for words in the index
The View menumenu_view is used to toggle the Tool BarHID_VIEW_TOOLBAR and the Status BarHID_VIEW_STATUS_BAR on and off, change the fontsHID_VIEW_FONT used in the file list and file contents pane and set other viewing options.
$#KGetting Started
When you run Wilbur for the first time it will display the Index Dialog.HIDD_INDEX Here you can specify which files are to be included in the index and if necessary which files to exclude. Across the top of the dialog are three page tabs labeled Include FilesHIDD_INDEXFILES, Exclude FilesHIDD_INDEXFILES and OptionsHIDD_INDEXOPTIONS. Clicking on these tabs will take you to the appropriate page of the dialog box.
When you have specified the files and options you want press the OK button on the dialog. This will cause Wilbur to scan all of the included files and prepare an index that can be used for quickly finding words you are looking for.
When the index is built, you will be given the option to save it immediately or you can save it later with the File/SaveHID_FILE_SAVE command. Once save it will be available for immediate use in future sessions.
To search for words with the Search/FindHID_INDEX_SEARCH (F2) command.
As you use your computer to create, delete and modify files your index will get out of date. You can rebuild the index from time to time or just update it with the Index/UpdateHID_INDEX_UPDATE command which is somewhat faster.
$#KContacting RedTree
If you have any questions, suggestions, or need any help, please contact us at one of the following:
Internet EMail: | wilbur@redtree.com |
WWW: | www.redtree.com |
CompuServe: | 70233,1004 |
Fax: | +1-604-423-6519 |
Postal: | 2 Timberline Crescent |
Fernie, B.C., V0B 1M1 | |
Canada |
Unfortunately we are not able to offer telephone support at this time.
$#KIndex Menu Commands
The Index menu offers the following commands:
EditHIDD_INDEX | Open the index dialog where you can specify which files to include and exclude from your index. |
BuildHID_INDEX_BUILD | Scan the files on the disk and prepare the index. |
UpdateHID_INDEX_UPDATE | Scan the disks for files that have been modified since the index was built and updates the index accordingly. |
StopHID_INDEX_STOP | Halts the current build or update operation. |
$#KBuilding an Index
This Index/Build command tells Wilbur to start indexing all the files you have designated in the Index/EditHIDD_INDEX dialog. You must build the index before you can searchHID_INDEX_SEARCH the files, but normally the build process starts automatically when you leave the Index/EditHIDD_INDEX dialog..
Building the index will probably take a few minutes if you have a significant number of files, particularly if you have a lot of zip files and are treating them as directories. Of course as you work on your computer, you will modify the contents of the indexed files or add files to the group and you will need to update the index to reflect these changes. This is done with the Index/UpdateHID_INDEX_UPDATE command. Since this command does not have to look at files that have not been modified since the full index was built, it is somewhat faster.
While Wilbur is indexing your files, you can still view and launch whatever files are listed in the file list, but you cannot do new searches. You can interrupt the indexing by clicking on the
{bmc hlp\stop.bmp}HID_INDEX_STOP
button on the toolbar, selecting Index/Stop on the menu bar or by pressing the escape key on the keyboard. If you interrupt the indexing, the resulting index will not have any files indexed, but all of your include and exclude specifications will be preserved. If there was a previous version of the index stored, you can read it back in, but you will have to first use the File/NewHID_FILE_NEW command to clear the erased copy from Wilburs memory.
Shortcuts
Keys: CTRL+B
$#KUpdating an Index
You must buildHID_INDEX_BUILD an index before you can searchHID_INDEX_SEARCH your files for whatever words you want. As you work with these files, the index will slowly get out of date. Rather than rebuilding the entire index, the update command will just re-index new or modified files and thus is somewhat faster than doing a full build.
Because update always checks all files modified since the last full build, you will still want to periodically do a full build so that later updates are faster. Also the update process does not remove deleted or moved files from the index, so you may encounter a file in the file list that cannot be read since it is no longer there.
While Wilbur is indexing your files, you can still view and launch whatever files are listed in the file list, but you cannot do new searches. You can interrupt the indexing by clicking on the
{bmc hlp\stop.bmp}HID_INDEX_STOP
button on the toolbar, selecting Index/Stop on the menu bar or by pressing the escape key on the keyboard. If you interrupt the indexing, the resulting index will not have any files indexed, but all of your include and exclude specifications will be preserved. If there was a previous version of the index stored, you can read it back in, but you will have to first use the File/NewHID_FILE_NEW command to clear the erased copy from Wilburs memory.
Shortcuts
Keys: CTRL+U
$#KDefining the Files to be Indexed
Before you can begin searchingHID_INDEX_SEARCH for words in your files, you must buildHID_INDEX_BUILD an index and before you can build an index you must tell Wilbur what files are to be included in the index. The Index/Edit command invokes the Index DialogHIDD_INDEX where you can specify which files to include or exclude from your index.
Note that you can use many different indexes with Wilbur. For instance I have a text index that contains all the files on my disk with letters, email, program documentation, etc.; another that indexes my program files; and another that indexes all the sample programs on my compilers CD-ROM.
You can switch from one index to another with the File menumenu_file commands.
Shortcuts
Keys: CTRL+I
$#KIndex Dialog
The index dialog is where you specify what files to include and exclude in the index and what options to use. Correspondingly it has three tabs across the top labeled Include FilesHIDD_INDEXFILES, Exclude FilesHIDD_INDEXFILES and OptionsHIDD_INDEXOPTIONS which lead to pages which are used to define how an index is built. Click on these tabs to bring each of the pages to the top and fill in the appropriate information.
When you are done press the OK button. Wilbur will start to rebuild the index automatically if you have made any changes to the index parameters. If no changes have been made the dialog box will simply vanish. If you have made changes on the options page and press the cancel button, the changes will be discarded. If changes are made to the file lists, they will persist even if the cancel button is selected and Wilbur will proceed to rebuild the index.
$ # K Include and Exclude Files Pages
These dialog pages are used to tell Wilbur which files you want included and which files you want excluded from the index. There is one page for each function, but they behave the same way.
Each page has a list showing the specified files and a number of buttons.
Add | Brings up either the include file dialogHIDD_INCLUDE or the exclude file dialogHIDD_EXCLUDE for entering or browsing for files to enter into the list.. |
Delete | Deletes the selected file names from the list. . Multiple list entries can be selected by the standard Windows methods of holding down the control or shift keys while clicking on an entry. |
Edit | Brings up a dialog where you can edit the entry which has the focus. Normally this will just be the selected item, but if multiple items have been selected it will be the last one clicked on and will have an outline box around it. |
Clear | Remove all entries from the list. |
Copy | Copies the selected entries to Windows clipboard. Since this is just normal text, it can be pasted into any text editing program for modification. |
Paste | Takes whatever text is in Windows clipboard and uses it to add entries to the list. When combined with the Copy button, this makes it easy to move entries between indexes or even to edit entries externally and re-enter them. |
It is tempting to just include all the files (*.*) on your disk and then exclude those files you dont want indexed like *.exe. You will probably end up with a huge slow index doing this. Instead include those files and file types that you know you want to search through and reserve the exclude list for excluding specific subgroups of those files.
Note that if you accidentally clear one of the file lists, closing and reopening this dialog will not restore the original names. Instead exit the dialog and close the index without saving it. Then read the index back in. The original lists will have been saved with the index.
Be sure to also check the options pageHIDD_INDEXOPTIONS for options controlling the characters that are considered parts of words and how zip archives are handled.
$ # K Index Options Page
The options page is used to designate additional information about the indexing operation:
General Options
Non-Alphabetic Characters to Index
In the simplest case Wilbur will only index characters from the English alphabet and the underscore character. All other characters are considered to terminate or separate words. However in many cases the material being indexed will not be in English, or the number characters or other characters will be important. To handle this the following options are provided:
When this box is checked, Wilbur will try to include words containing diacritics like ç, ü, æ, å etc. Unfortunately most Windows programs store these characters in a different manner than other programs do. Wilbur makes a guess based on the first few characters in the file as to the likely format. This normally works, but is not infallible. If you are indexing files that contain binary material and are not interested in these characters, leave this box blank to reduce the size of your index file.
DOS Style Text Files
When this box is checked, Wilbur will assume that any file that appears to be all text should be assumed to have DOS style handling of international characters. Since Windows based programs such as Notepad and Web browsers will create text files using the Windows style of international characters, you probably dont want to set this flag unless you are sure the files you are indexing have been created by DOS programs. All files that appear to be in a binary format, like MS Word documents, are assumed to be Windows style files.
Note that prior to version 1.4 Wilbur always behaved as if this flag was set. Indexes created with those versions will continue to have this flag set until it is cleared.
Other Characters
You can explicitly specify characters which are to be considered valid. For instance this was originally requested by someone who wanted to search for the term C++ in resume files. By placing a single plus sign in the Others not starting word box this can be accomplished. Obviously you would not want to do this if you were indexing program source code since the plus sign would often be the terminator for a variable name.
Characters placed in the Others anywhere box are valid anywhere in a word while characters in the Others not starting word box are not valid as the first character in a word.
$#KTemporary Zip Path
If you are treating ZIP files as directories, you should specify a directory in the Temporary Zip Path that Wilbur can use to temporarily extract files. If this directory does not exist, Wilbur will create it. Any files extracted will be deleted when Wilbur is finished with them, but directories stored in the ZIP files may be left behind as subdirectories in the temporary directory. These dont take much space, but you can delete them if you wish; Wilbur will recreate them when necessary.
$#KInclude File Dialog
Enter the name of the file(s) you wish indexed. The * and ? wild card characters can be used in the filename portion of the path. All the subdirectories of the path will be searched for matching files as well. For instance c:\word\*.doc would look in the word directory and all its subdirectories for files with the doc extension.
You can use a * character for the drive letter to designate that all local non removable drives should be included. A + character will include all local non removable files as well as all network drives that are assigned to a drive letter.
The browse button will open up a standard windows file open dialog. This can be useful for finding specific directories containing files or groups of files you wish to index. Note that unlike a most file open dialogs, filenames with the wild card characters * and ? are accepted by this dialog. Thus if you browse to the c:\notes directory, type *.txt into the file name field and hit open, a file specification of c:\notes\*.txt will be entered.
$#KExclude File Dialog
This dialog works identically to the include file dialogHIDD_INCLUDE except the results are entered into the exclude file list. All the same wild card options are available.
$#KStopping an Index Build or Update
This command will halt the building or updating of an index. Inorder to save memory usage, the original index is not retained during the build process, so after a build or update is interrupted, the resulting index will not have any files indexed. All of your include and exclude specifications will be preserved however. If there was a previous version of the index stored, you can read it back in, but you will have to first use the File/NewHID_FILE_NEW command to clear the erased copy from Wilburs memory.
Shortcuts
Keys: Esc
Search For:
Enter the word or words you want to search for. See the Searching ForHID_INDEX_SEARCH topic for a description of using wildcards and logical operators in your search phrase. Click on the down arrow at the right of the box to see a list of previous search phrases.
In:
Normally you will leave this box empty and Wilbur will search for your words in all the files in the index. Sometimes you may want to only search a subset of these files. In this case you can enter a description of the file names you wish to search. For instance you may have indexed all of your txt, wri and doc files, but only be interested in doc files for the current search. By entering *.doc in this box, Wilbur will only display doc files that contain your words. Of course the files must have been in the index when it was last built or updated if Wilbur is to find them.
You can have multiple file descriptions separated by spaces - for instance *.doc *.wri. You can also freely use the ? and * wildcards in the description. Note that the * wildcard will match as much as possible of the target name. The ? always matches a single character.
You can click on the down arrow at the right of the box to see a list of previous file sets.
Reverse Search
Once Wilbur has entered all the files containing your search phrase in the file list, it normally selects the first file in the list and displays the first occurrence of the phrase in that file in the contents pane. If this box is checked, Wilbur will select the last file in the list and display the last occurrence in that file. When this dialog appears because you have begun to type text in the contents pane, the effect of checking this box is to have Wilbur search backwards from the current cursor position for the typed text.
Use Soundex:
If this box is checked, Wilbur will not only match the word(s) in your search phrase, but also words that sound like them. This uses the venerable soundex method which is simple, but rather general. It can be effective on relative small collections, but tends to generate a lot of spurious hits in large bodies of text. This may be removed in future versions, so if you find it useful let us know.
Index Attributes
The date the files were last indexed, the type of number handling, international character handling and minimum and maximum word length options that were set in the options page HIDD_INDEXOPTIONS of the Index DialogHIDD_INDEX are listed here.
OK & Cancel:
Pressing OK starts the search, while clicking the Cancel button aborts the search.
$#KSearching for Words
The Search/Find command will pop up a search dialogHIDD_SEARCH where you can enter the phrase or phrases you want to find. Wilbur will then search through the index and put any files matching your criteria into the file list panefile_list.
You can also search for any phrase in the currently selected file by just starting to type while the contents panepane_view is selected (the viewed text will be black, not gray). This type of search does not change which files are in the result list.
The search phrase can be a single word or a series or words possibly separated by logical operators. A word can contain a ? to indicate any character is acceptable in that position. It can also contain a * to indicate that any number of arbitrary characters can be in that position.
If two or more words are listed and they are not separated by a logical operator, Wilbur will only list those files that contain all of the words. In other words, Wilbur will perform a logical AND if no other operator is present. The & character can also be used explicitly if you prefer.
You can also use the < symbol to designate that the next word must be present within a certain number of words. All the files which contain both words will still appear in the file listfile_list, but Wilbur will only highlight words in the file contents panepane_view, if the second word is near the first word. This means that when you select some files, Wilbur will just jump to the bottom of the file since none of the word meet this criteria. Pressing F3 will continue the search in the next file.
The allowable separation for near words can be set in the File/PreferencesHIDD_PREFERENCES dialog, or you can immediately follow the < symbol with a number which will override this default. For instance:
Santa <20 sleigh
will only highlight occurrences of Santa that are followed within 20 words by sleigh.
If two words are separated by a | symbol, then Wilbur will list any file that has either of the words in it. Here Wilbur is performing a logical OR.
If a word is preceded by the ^ symbol, Wilbur will not list any file which contains that word.
Wilbur evaluates an expression from left to right and does not support parenthesis. Thus the expression:
red blue | green
would list all files that had both red and blue or green or all three in them. The expression:
green | red blue
would find all the files that had green or red and also had blue in them.
The current search results can be used as the basis of the next search by starting a search phrase with the AND character (&) or the OR character (|). If the search string starts with an & then only files in the current search list which also meet the new criteria will be in the final list. If the search string begins with the | character, then any file meeting the new criteria will be added to the existing file list.
Note that while most searches are very fast, very general wildcard searches can take a while. You can click in either the contents or file list pane to halt a search if you wish.
Shortcuts
Keys: CTRL+F or F2
$#KFind Again
The Search/Find Next command looks for the next instance of the sought after text. The search starts from the cursor location in the contents pane and proceeds downwards. If there are no more occurrences of any of the words in the search phrase, Wilbur will proceed to the next file in the list.
If you wish to halt a search, simply press any key on the keyboard or click the mouse in either pane.
Shortcuts
Keys: F3
$#KFind Previous
The Search/Find Previous command looks for the previous instance of the sought after text. The search starts from the cursor location in the contents pane and proceeds towards the beginning of the file. If there are no more occurrences of any of the words in the search phrase, Wilbur will proceed to the previous file in the file list.
If you wish to halt a search, simply press any key on the keyboard or click the mouse in either pane.
Shortcuts
Keys: Shift F3
$ # Quick Find
This command brings up the search dialogHID_INDEX_SEARCH with the word that was under the cursor in the contents pane already filled in as the search text. If there was text selected in the contents pane, then that is used instead.
Shortcuts
$#KText Editing
You can use a default editor to edit any file selected in the file list, by selecting File/Edit. This is handy when you want to edit text files that dont have an association with an application. The default editor is Notepad, but you can change this by selecting PreferencesHIDD_PREFERENCES from the file menu.
Files inside ZIP archives cannot be edited.
Shortcuts
Keys: CTRL+E
$#KLaunching a File in an Application
A file in the file list can be launched in its associated application with the File/Launch command. You can also launch a file by double clicking on its name in the file list. If there is no association, then this command will have no effect.
Files inside ZIP archives cannot be launched.
Shortcuts
# File Preferences Command
This command invokes the File Preferences DialogHIDD_PREFERENCES.
$#KPreferences Dialog
Text Editor Command
Enter the command to be given when the File/EditHID_FILE_EDIT is chosen. The path name of the file selected will be supplied as a parameter to this command. The browse button opens a standard file open dialog to assist you in finding the right path.
Directory for Indexes
This is the path to a folder where Wilbur index open and save dialogs will originate. Indexes can still be saved anywhere, but this mechanism helps promote keeping them all in one place. The default path is to an indexes folder in the folder where the Wilbur executable lives. Wilbur will create this folder as necessary.
Temporary Zip Pathtemp_zip_path
This is the directory where zip files are temporarily expanded.
Max Words Separation for Near
The separation allowed, in words, for a near search (see Index/SearchHID_INDEX_SEARCH).
Contents Tab Size
The number of character widths (based on the letter A) represented by a tab in the contents pane.
Word Wrap Size
The line length in characters before the line is wrapped back to the left edge of the window.
Start in Outline Mode
If this box is checked, Wilbur will put the contents pane into outline mode (just lines containing searched for words are shown) when it is first started.
$#KChanging Fonts
You can change the font used in either the file list or file contents pane. Click in which ever pane you want to change and then select View/Font. A standard font selection box will come up allowing you to select the font characteristics you want.
When you save an index, the fonts you have selected will be stored with it and used automatically the next time you read in the index.
Shortcuts
$#KFile List Pane
The top of Wilburs window has a list of the files that meet the current search criteria. If the search criterion is blank, then all the files in the index will be listed. The listing consists of five columns containing the file name, the number of searched for words in the file, the file extension, the full file path and the date the file was last modified. The file list can be reordered by clicking on the column title bar at the top of the list. To sort by date, just click on the Last Modified header. If the list was already sorted by date, then clicking on it again will reverse the order of the sort (oldest first).
Clicking on the name of a file in the name column will result in the text of that file being displayed in the file contents panepane_view at the bottom of the Wilbur window.
Double clicking on a file name will launch that file in its associated application.
More than one file can be selected in the file list by using the standard Windows shift click and control click procedures. In this case the file displayed in the contents pane will be the one with the focus. This is usually the last file touched and will have a thin outline box around it in the list. Multiple selections are useful for exporting entries from the file list or copying selected files to other folders. (See the File Menu Commandsmenu_file)
If you are running Windows 95 interface, then clicking on the file name with the right mouse button, will pop up the context menu for the file which will let you perform various operations on the file. Since the context menu might move or delete the file, Wilbur checks after the command is done to see if the file is still there. If it isnt then the file is removed from the index. This also provides a handy shortcut for removing index entries for files that have been removed in other ways. Note that Wilbur may not be able to update the index this way in network environments where more than one person is using the index.
$#KFile Contents Pane
At the bottom of Wilburs window is the file contents pane which displays the text of the file selected in the file listfile_list.
The purpose of this display is just to show the sought after words in context. No attempt is made to retain the formatting of word processing or other formatted files, but unprintable characters are stripped out and some basic paragraph and line formatting is done when possible. Still some files such as MS Word documents may show a considerable amount of normally hidden material and may even have multiple copies of the desired text. To view these files in their native format, simply double click the file name in the file list or select File/LaunchHID_FILE_LAUNCH to launch its associated application. If you are running Windows 95, you may be able to Quick View the file by bringing up the context menu with a right mouse click on the file name.
You can toggle outline mode off and on with the View/Outline CommandHID_VIEW_OUTLINE or by pressing the + key on the numeric keypad. When outline mode is in effect, the background of the contents pane will turn light yellow and only lines which contain one of the search words will be displayed. Wilbur attempts to keep your position in the file synchronized as you switch back and forth between modes.
You cannot edit the material in the view pane, but you can select text by dragging the mouse cursor across it while holding the left mouse button down. The selected text can be copied it to the Windows clipboard with the Edit/CopyHID_EDIT_COPY command or appended to a standard export.txt file with the Edit/ExportHID_EDIT_EXPORT command.
When you click in the with mouse in the contents pane, it becomes the focus for keyboard commands. This is shown by displaying a text cursor and by switching the text from gray to black. The arrow keys can then be used to scroll the contents up and down and sideways. The home and end keys can be used to jump to the top and bottom of the file respectively, while the page up and page down keys can be used to jump up and down one screen at a time.
While the contents pane has the focus you can also start a secondary search by simply starting to type a search phrase. A search dialogHIDD_SEARCH is opened where you can complete the search phrase. When this dialog is closed, Wilbur will start searching from the current cursor position for the word or words. The Search/Find NextHID_INDEX_FINDNEXT or the Search/Find PreviousHID_SEARCH_FINDPREVIOUS command can be used to continue the search for further occurrences. When the end of file (or beginning if reverse searching) is found, the search continues in the next file in the list. Note that succeeding files are only searched when the Search/Find NextHID_INDEX_FINDNEXT or the Search/Find PreviousHID_SEARCH_FINDPREVIOUS command is used. If the original search did not find the string, it will not automatically proceed to the next file unless one of those commands is used.
To stop a search that is proceeding through successive files without success, click in either the file list or the file contents pane or press any key on the keyboard.
$ # KCommand Line Arguments
If Wilbur finds a file name on its command line when it starts up, it will automatically open that file as an index. This is standard behavior for Windows programs and is necessary so that double clicking on an index works correctly.
You can also follow the file name with a space and a search phrase. Wilbur will then start and automatically bring up the search dialog with that phrase filled in. This makes it easy to construct a simple word processor macro which will automatically launch Wilbur and search for the word under the cursor when an assigned hot key is pressed. (MS Word Example)Word_Example If a -s precedes the search phrase, then Wilbur will skip the dialog box and proceed directly to the results of that search.
A similar procedure can be used in a programming development environment to search sample files etc.
The command line can also be used to automatically build or update an index. If Wilbur finds a -b on the command line before the file name, it will automatically rebuild the index after it opens it and then save the new index and shutdown. This allows you to use the System Agent in the Windows 95 Plus pack or the NT AT command can be used to launch Wilbur at a predetermined time like the middle of the night, and rebuild its index. It could also be used if you want to use an icon to launch a build.
A -u is treated similarly, but starts an update instead of a build.
If a copy of Wilbur is already running when you try to run a second copy, Wilbur simply switches to the original copy and attempts to execute the new command line, if there is one. By placing a -2 switch as the first parameter on the command line, you can override this behavior and have a second copy of Wilbur open. Also a copy of Wilbur opened with the -2 parameter will not be usurped by another run of Wilbur even if that second call does not have the -2 parameter on the command line.
Examples:
To build and save the index an index:
To start Wilbur and immediately search for the word redtree:
wilbur c:\indexes\text.wil -s redtree
Same as above, but start a second copy of Wilbur if it is already running:
wilbur -2 c:\indexes\text.wil -s redtree
To start wilbur and have it open the search dialog with redtree already filled in:
wilbur c:\indexes\text.wil redtree
$ # Word Macro Example
The following macro, suitably modified for your path names, can be used to launch Wilbur and search for the text under the cursor:
Sub MAIN
SelectCurWord
Shell "g:\wilbur\WinRel\wilbur.exe " + "d:\wilbur\text.wilbur " + Selection$()
SendKeys "{enter}"
End Sub
or if you have spaces in your path names you will need the more complicated form:
Sub MAIN
SelectCurWord
Shell Chr$(34) + "g:\wilbur\WinRel\wilbur.exe" + Chr$(34) + " " + "'d:\wilbur\text.wilbur' " + Selection$()
SendKeys "{enter}"
End Sub
Please be careful to get the spaces after the path names included correctly.
Use the Tools/Macro command to create the macro and give it a name like Wilbur. Then use the Tools/Customize command to assign a hot key (Ctrl+Alt+W perhaps) to the macro and you are in business.
$ # K View Outline
This command switches the contents pane to a compressed mode where only lines which contain one of the searched for words are displayed. When it is set the background of the contents pane will turn light yellow and a check mark will appear beside the command in the view menu. Wilbur attempts to keep your position in the file synchronized as you toggle outline mode on and off.
Shortcuts
$ # K View International Characters
This command can be used to toggle the display of international characters in the contents pane. When the toggle is on, there will be a check mark beside the command in menu and characters such as those with diacritic marks like ç, ü, æ, å etc. will be displayed in the contents page. Normally this switch is automatically set by the state of the international character check box used in the index dialog boxHIDD_INDEXOPTIONS when the index was created.
Changing this toggle has no effect on whether words with international characters are indexed. Although a file containing international characters can be viewed if this switch is on, global searches for words containing international characters will fail it the international character check box in the index dialog boxHIDD_INDEXOPTIONS was not set when the index was built.
$ # K View DOS Style Text Files
Unfortunately DOS and Windows programs handle international characters differently. Wilbur always assumes files beginning with non text characters have been created with Windows programs like MS Word. Unfortunately for pure text files it is difficult to tell how they might have been created and hence this switch. It normally tracks the corresponding setting in the the index dialog boxHIDD_INDEXOPTIONS, but can be used to switch how the contents pane displays a file.
Note that this has no effect on how the files were indexed. A file which has been indexed assuming Windows text handling can be viewed and searched locally with DOS text handling, but a global search would not find words containing international characters if the file did indeed contain DOS style international characters.
$ # View Next File
Selects the next file in the file list and displays its contents in the contents pane.
Shortcuts
$ # View Next File
Selects the previous file in the file list and displays its contents in the contents pane.
Shortcuts
$ # K View - Quickview
Launches Quickview for the currently selected file.
Shortcuts
Right click any where in the contents pane.
$ # K View - Automatic Quickview
When this option is on, Wilbur launches Quickview every time a new file is selected and then waits a second before once again making itself the active window. The effect is to keep the Quickview window synchronized with the Wilbur selection. You will want to size the Quickview window and the Wilbur window appropriately so that both can be seen and be sure and tell Quickview to reuse its window so that you dont end up with a horde of Quickview windows.
Shortcuts
$ # Miscellaneous Tips Etc.
This section has some topics which either dont fit elsewhere or that could use some additional emphasis. It will undoubtedly change from version to version.
Using local searchesLocalSearch
Use System Agent or the NT AT command for buildsSystemAgent
Dont Index EverythingNotAll
Window PositioningWindowPosition
$ # K Saving MS Word Documents
When you save a document in MS Word with the Fast Save option enabled, Word stores a lot of extraneous stuff in the file, possibly including deleted text, old versions or even stuff from other programs that were running on your machine when the save was done. Normally all this does is waste disk space, but since programs like Wilbur can view this information, it could potentially cause security or embarrassment problems if you share your documents with others. It will also result in Wilbur indexing and viewing extraneous material in your file. For these reasons you may wish to disable the Fast Save feature by selecting Options from the Word Tools menu and then selecting the Save tab and clearing the Allow Fast Saves check box.
$ # Using Local Searches
A sometimes overlooked feature of Wilbur is that you can do a local search in a file which is being viewed. To do this simply click somewhere in the contents pane so the text is black rather than gray and then start typing the search phrase. A search dialogHIDD_SEARCH will open where you can complete your request. Unlike a search initiated by the F2 key, this search does not change what files are in the file list, but rather searches through the displayed contents of the current file from the cursor position. If the end of the file is reached and the F3 search again command is given, the search will continue in succeeding files of the file list until a match is found.
$ # Use System Agent or the NT AT Command for Building Indexes
Instead of updating indexes, consider using the system agent which comes with the Windows 95 Plus! Pack or the NT AT command to have Wilbur just rebuild your indexes on a regular basis. Check the Command Line Parameterscommand_line for information on how to set Wilbur up to do this.
$ # Dont Index Everything
It is always tempting to include *.* as a file specification and then to try and exclude things like executable files etc. Although it is possible to do this, in practice you almost always end up overlooking a bunch of large irrelevant binary files. This makes indexing much slower and your index files unnecessarily large. You should probably restrict *.* inclusions to specific folders where you know all the files are relevant. A good starting point for general list of text files would be something like: *:\*.txt *\:*.wri *:\*.doc *:\*.htm* *:\*.lst *:\*.msg *:\*.mbx .
$ # Window Positioning
When Wilbur is shut down it records the size and position of its window as well as the position of divider between the file list and contents panes and the positions of all the dividers between the columns in file list. When Wilbur is restarted it will use all of these settings, so you can set Wilbur up to start the way you want it. However Wilbur will not start as a maximized window even if it was maximized when it was shut down.
$ # KOLE Automation Routines
Wilbur provides a number of OLE Automation routines which permit indexes to be built and searched by other programs. All of the routines will be discussed in terms of Visual Basic since it and its VBA counterpart used in Microsoft Office products. Of course any language capable of calling OLE automation routines could be used.
The following functions are supported:
$ # KCreating a Wilbur OLE Object
The first step in using an OLE object it to create it. In Visual Basic you would create a Wilbur object with code like:
Set wilbur = CreateObject("Wilbur.FileIndex")
In all of the function examples it is assume a wilbur object has already been created.
$ # KAddExclude OLE Automation Routine
AddExclude( fileSpec )
Example:
would use the contents of the Text1 field as a file exclusion specification.
$ # KAddInclude OLE Automation Routine
AddInclude( fileSpec )
Example:
would use the contents of the Text1 field as a file inclusion specification.
$ # KAddMessage OLE Automation Routine
AddMessage( message )
Wilbur maintains a list of messages that would normally appear in warning boxes etc. This list can be retrieved with the GetMessageOLE_GETMESSAGES routine and cleared with the ClearMessageOLE_CLEARMESSAGES routine. The AddMessage routine is provided so you can inject your own messages into this list. A newline will automatically be added to the end of message.
Example:
$#KBuild OLE Automation Routine
Build( waitTime )
Example:
Build the index and allow 15 minutes (15*60*1000 milliseconds) for it to complete.
$ # KClearExcludes OLE Automation Routine
ClearExcludes()
Removes everything from the exclude file list.
Example:
$ # KClearIncludes OLE Automation Routine
ClearIncludes()
Removes everything from the include file list.
Example:
$#KClearMessages OLE Automation Routine
ClearMessages()
Wilbur maintains a list of messages that would normally appear in warning boxes etc. This list can be retrieved with the GetMessageOLE_GETMESSAGES routine and added to with the AddMessageOLE_ADDMESSAGE routine.
The ClearMessages routine simply removes all messages from the list
Example:
$#KGetAddedCharacters OLE Automation Routine
GetAddedCharacters()
Example:
added = wilbur.GetAddedCharacters
$#KGetAddedTrailing OLE Automation Routine
GetAddedTrailing()
Example:
added = wilbur.GetAddedTrailing
$#KGetDOSText OLE Automation Routine
GetDOSText()
Example:
flag = wilbur.GetDOSText
$#KGetExclude OLE Automation Routine
GetExclude( itemNumber )
Returns a string containing the file specification or an empty string if itemNumber is larger than the number of items in the list.
Example:
Dim nCount As Integer
Dim sPath As String
nCount = 1
While nCount
sPath = wilbur.GetExclude(nCount)
nCount = nCount + 1
If sPath <> "" Then
List1.AddItem (sPath)
Else
nCount = 0
End If
Wend
This example will fill a list box with all of the entries in the exclude list.
$#K GetInclude OLE Automation Routine
GetInclude( itemNumber )
Returns a string containing the file specification or an empty string if itemNumber is larger than the number of items in the list.
Example:
Dim nCount As Integer
Dim sPath As String
nCount = 1
While nCount
sPath = wilbur.GetInclude(nCount)
nCount = nCount + 1
If sPath <> "" Then
List1.AddItem (sPath)
Else
nCount = 0
End If
Wend
This example will fill a list box with all of the entries in the include list.
$#KGetInternational OLE Automation Routine
GetInternational()
Example:
flag = wilbur.GetInternational
$#KGetMessages OLE Automation Routine
AddMessage( message )
Wilbur maintains a list of messages that would normally appear in warning boxes etc. This list can be retrieved with this routine and cleared with the ClearMessageOLE_CLEARMESSAGES routine. The AddMessageOLE_ADDMESSAGE routine your own messages into this list.
Example:
$#KGetNumberHandling OLE Automation Routine
GetNumberHandling()
The possible return values are:
Example:
numberType = wilbur.GetNumberHandling
$#K GetNumberOfBytes OLE Automation Routine
GetNumberOfBytes()
Example:
indexSize = wilbur.GetNumberOfBytes
$#K GetNumberOfFiles OLE Automation Routine
GetNumberOfFiles()
Example:
numberFiles = wilbur.GetNumberOfFiles
$#K GetNumberOfWords OLE Automation Routine
GetNumberOfWords()
Example:
numberWords = wilbur.GetNumberOfWords
$#K GetTimeCreated OLE Automation Routine
GetTimeCreated()
Example:
indexDate = wilbur.GetTimeCreated
MsgBox ("Index Created " + Format(indexDate, "General Date"))
$#K GetZip OLE Automation Routine
GetZip()
Example:
flag = wilbur.GetZip
$#K OpenIndex OLE Automation Routine
OpenIndex( indexPath )
Returns True if the index was opened successfully, otherwise False.
Example:
if an index is already open, then close it
If bIndexLoaded Then
wilbur.quit
bIndexLoaded = False
End If
Set wilbur = CreateObject("Wilbur.FileIndex")
bIndexLoaded = True
If Not wilbur.OpenIndex(Text1.Text) Then
MsgBox ("Could not load index")
End If
This example opens an index that has had its name entered in the Text1 field. If an index was already open, it is closed first..
$#K Quit OLE Automation Routine
Quit()
Closes the index and releases the Wilbur object.
Example:
$#K RemoveExclude OLE Automation Routine
RemoveExclude( fileSpec )
Example:
sPath = wilbur.GetExcludeOLE_GETEXCLUDE(1)
wilbur.removeExclude (sPath)
This example would remove the first entry from the file exclude list.
$#K RemoveInclude OLE Automation Routine
RemoveInclude( fileSpec )
Example:
sPath = wilbur.GetIncludeOLE_GETINCLUDE(1)
wilbur.removeInclude (sPath)
This example would remove the first entry from the file include list.
$#K SaveIndex OLE Automation Routine
SaveIndex( indexPath )
Returns True if the index was saved successfully, otherwise False.
Example:
MsgBox (wilbur.GetMessages)
End If
This will save the index with the path entered into the Text1 field. If it cannot be successfully saved, a message box is displayed with whatever messages were generated by Wilbur.
$#K SearchFor OLE Automation Routine
SearchFor( searchPhrase )
Returns An SearchResultsOLE_SEARCHRESULTS object which is a list of the files in the index in which Wilbur found matches for the search phrase.
ExampleOLE_SEARCHFOREXAMPLE
$#SearchFor Example
Dim search2 As Object
get the list of files containing the phrase entered
in the Text1 field
Set searchResults = wilbur.SearchFor(Text1.Text)
Extract the names from the list and use them to fill a list box
Dim bResult As Boolean
Dim nCount As Integer
nCount = 0
bResult = searchResults.setToStartOLE_SETTOSTART
While bResult
Dim lastMod As Date
lastMod = searchResults.getModifiedDateOLE_GETMODIFIEDDATE
List1.AddItem searchResults.getPathOLE_GETPATH + Chr(9) + Format(lastMod)
bResult = searchResults.setToNextOLE_SETTONEXT
nCount = nCount + 1
Wend
This will search the index and place matching files in the searchResults objectOLE_SEARCHRESULTS. This list is then looped through and the path names and modified dates of the files are placed in the list box..
$#K Search Results Object
The SearchForOLE_SEARCHFOR routine returns an object which is the list of files with successful matches. The contents of this list can be accessed with the following routines:
$#K getModifiedDate Search Results OLE Automation Routine
getModifiedDate()
This routine is available only for the object returned from the SearchForOLE_SEARCHFOR routine.
ExampleOLE_SEARCHFOREXAMPLE
$#KgetPath Search Results OLE Automation Routine
getPath()
This routine is available only for the object returned from the SearchForOLE_SEARCHFOR routine.
ExampleOLE_SEARCHFOREXAMPLE
$#KsetToNext Search Results OLE Automation Routine
setToNext()
This routine moves the list cursor to the next item in the list. The list cursor position is used by the getModifiedDateOLE_GETMODIFIEDDATE and getPathOLE_GETPATH functions.
ExampleOLE_SEARCHFOREXAMPLE
$#K setToStart Search Results OLE Automation Routine
setToStart()
This routine moves the list cursor to the first item in the list. The list cursor position is used by the getModifiedDateOLE_GETMODIFIEDDATE and getPathOLE_GETPATH functions.
ExampleOLE_SEARCHFOREXAMPLE
$# KSetAddedCharacters OLE Automation Routine
SetAddedCharacters( addedCharacters, addedTrailing )
AddedTrailing sets the non standard characters specified as indexable in the Other Not Starting Word field of the option pageHIDD_INDEXOPTIONS ( index dialogHIDD_INDEX ).
Example:
Sets the plus sign to be a significant character for indexing words.
$#K SetDOSText OLE Automation Routine
SetDOSText( newValue )
Example:
Clears the DOS Style Text flag.
$#KSetInternational OLE Automation Routine
SetInternational( newValue )
Example:
Clears the International Character flag.
$#K SetNumberHandling OLE Automation Routine
SetNumberHandling( newValue )
The possible values for newValue are:
Example:
Sets the index so that when it is built all numbers will be significant in words.
$#K SetZip OLE Automation Routine
SetZip( newValue )
Example:
Tells the index to treat Zip archives like folders.
$#K Update OLE Automation Routine
Update( waitTime )
Example:
Update the index and allow 15 minutes (15*60*1000 milliseconds) for it to complete.