home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Phoenix CD 2.0
/
Phoenix_CD.cdr
/
15a
/
nav11.zip
/
NAVSTAR.DOC
< prev
next >
Wrap
Text File
|
1989-05-31
|
76KB
|
2,288 lines
Navstar 1.1
The Power-User's File Management Tool
Christopher R. S. Schanck
May 30, 1989
Copyright 1989
Table of Contents
Philosophy...........................................1
Comments.............................................3
Installation.........................................4
Screen Display
Files...........................................5
Current & Logged Path...........................5
Pages Line......................................5
Sort Type & Order...............................6
Logged Drive....................................6
Navigation & the Cursor.........................7
Filename Character Search.......................7
File Information Line...........................8
Informational Keystrokes
Help............................................9
Information Key.................................9
Key & Extension Information.....................9
Commands which Alter Navstar
Change Directories.............................10
Jump Directories...............................11
Log Current Directory..........................11
Swap Logged & Current..........................12
Change Sorting Method..........................12
Toggle Sort Order..............................12
Edit Attribute Mask............................12
Refresh Screen.................................12
Commands to Manipulate Files
Marking Files..................................13
Copying Files..................................13
Backing Up Files...............................14
Moving Files...................................14
Making Directories.............................14
Renaming Files & Directories...................14
Deleting Files & Directories/Global Verify.....15
Deleting Files & Directories/Ind. Verify.......15
Altering File Attributes.......................15
Executing Programs from within Navstar
Invoking a System Shell........................16
Command Line Expansion.........................16
Execute with Parameters........................18
"Hot" Execute..................................18
The Action Key & Recognizable Extensions.......18
Viewing Files..................................18
Editing Files..................................18
Definable Keys.................................19
Exiting Navstar.....................................19
Examples
Recognizable Extensions........................20
Definable Keys.................................21
Installation: The Navinst Program
General Comments...............................22
Invoking Navinst...............................22
Main Menu......................................22
Modify Key Definitions.........................23
Modify Colors..................................23
Modify Sort Order..............................23
Modify Sort Method.............................23
Modify Recognized Extensions...................24
Modify Global File Attributes..................24
Modify Video Type..............................24
Modify Maximum Number of Files Allowed.........24
Modify Maximum Number of Directories Allowed...25
Reading in a Configuration File................25
Help Screen....................................25
Exiting Navinst................................25
The CCD Change Directory Program....................27
The Navshell Program................................28
The Disklist Program................................29
Licensing Agreement.................................30
Registration Form...................................33
The Author..........................................35
Acknowledgements....................................36
Navstar's Philosophy
When I set out to create Navstar, I did not set out to
create Navstar. Rather, it evolved from a "better DIR"
program into the productivity tool it is now. Somewhere
around halfway between then and now, I sat down and did a
complete redesign in order to formalize what I wanted from
it. In doing so I looked at a dozen or so file/disk managers,
both of a commercial and public domain nature.
In doing so, I noticed one common characteristic. Nearly
all of these products were aimed at "protecting" the user
from DOS to some degree. A large portion of them billed
themselves as "simplifying" DOS, or "giving power to the non
power-user". In doing so, they tended to provide not so much
functionality as protection. Very few of them were designed
to allow a person to use his/her own knowledge of DOS to the
fullest extent.
In designing Navstar, I went the other direction. I
elected not to include functions which I felt power-users
would find a waste of RAM. A good example of this was my
decision as to whether or not to implement a "visual tree" of
the directory structure to allow easier navigation of the
hierarchy. In discussing it with colleagues, several pointed
out it was a great aid in making the hierarchical structure
easier for novices to comprehend. With this I concur.
However, I felt the overhead for the code/data needed to
implement a visual tree was not warranted. Now I am sure
there are those who would and who will argue with me, and I
welcome such correspondence. However, this is a good example
of the driving ideal behind Navstar.
As an aside, in version 1.1 a 'jumpdir' function which
allows for a nice method of hierarchical tree navigation.
Instead of a super-slick interface, Navstar provides a no-
nonsense, extremely functional method of navigation. The
jumpdir function is useful proportional to the amount of
familiarity a user has with the directory structure of a
volume. Most power users are intimately familiar with their
directory structure, and so can use jumpdir extremely well.
Yet another example is the admittedly boring display
screen Navstar uses. No flashy borders adorn the display; its
function is to provide the maximum amount of information in
the least amount of space and allow the user to utilize that
information effectively. Yet I think you will find that a
boring screen is not so great a detriment as some would have
you believe.
My personal system is an 8088-based (4.77 Mhz!) system,
and Navstar is more than usable with respect to speed on this
system. In using this system I was at the lowest common
denominator, so it was relatively easy to detect critical
areas. Because of this, Navstar really flies on 286 and 386
systems with fast hard drives. Both speed and space were
critical considerations, speed because my system is slow, and
Navstar 1.0
1
size because Navstar is designed to run other programs with
ease. When executing another program, Navstar takes up only
about 47k (depending on configuration options) or a mere 7k
(!!!) of your precious system memory, depending on how it is
invoked. These rather sparse memory requirements are a great
advantage when one wishes to run programs from inside
Navstar.
While most other similar products include extensive
pull-down menus or similar "nice" command structures, I found
this to be counter-productive in light of my goal. Similar
reasoning led me to make the installation process part of a
separate program; this saves the memory that in-code
installation would otherwise use. And so on; the very simple
command structure is another by-product of this train of
thought.
Several of the other products ignored color; since I
have a CGA system (flicker-free!), color was of distinct
importance to me. I made the color options as varied as
possible. Hopefully they are wide-ranging enough to suit
everyone. Since I have a CGA card, the 43 and 50 line modes
of EGA and VGA cards are not supported; this should change in
the future.
The aged-ness of my system does have some drawbacks
though. For instance, I have no access to extended or
expanded memory, so Navstar makes no use of such peripherals.
This is something I hope to rectify in the future. In version
1.1, it is relatively easy to make Navstar use an extended or
expanded memory RAMdisk.
A few extra words are in order about Navstar's use of
memory. Normally, Navstar stores two distinct blocks of
information. First, it stores the directory information,
which is read from the CCD.DAT file. This block of memory is
not deallocated when other processes are executed from inside
of Navstar. Therefore, the exact memory requirements of
Navstar differ for different configurations.
Second, Navstar stores each file entry as part of a
dynamically allocated block of memory. However, when
executing another program, Navstar deallocates this entire
block in order to save memory. When the program(s) are
finished executing, Navstar must then reread and resort the
current directory. This is somewhat different from other,
similar, programs. Generally, these programs retain the
directory in memory, thereby chewing up gobs of memory and
leaving little for the program to use.
Finally, while Navstar has been released for only 3
months now, it has been a "bootstrap" system. By that I mean
it has been used in its own development for the past six
months to a year. So, while I will not go out on limb and say
that it is bug-free, it is bug-minimal(?).
Navstar 1.0
2
Comments on Navstar
This manual does not completely specify Navstar. In
using Navstar you will encounter lots of things which are not
covered in the manual. Most of these things are minor
touches, such as the string editing. String editing is quite
complete in Navstar; you can toggle between Insert/Overwrite
modes, navigate forward and backward using the arrow keys as
well as some control combinations. Navstar also "remembers"
the last executed command, making repeated commands easier,
as well as recovering from mistyped commands which failed to
execute.
This manual is intended to supplement the natural
curiosity of the DOS power-user. Navstar is constructed in
such a way that anyone with a solid background in DOS can
begin using it immediately; the beginner will have to spend
some time experimenting, but he or she too should have little
difficulty tapping the power of Navstar.
Navstar 1.0
3
Installation
Installing Navstar is quite simple. First of all, create
a directory for Navstar (say, called \navstar on your C:
drive) using DOS's mkdir (make directory) command. Now copy
all the files from the distribution disk over to this
directory (c:\navstar).
Now, a few changes must be made to your AUTOEXEC.BAT
file. First, add a line
set NAVSTAR=c:\navstar
or =whatever path Navstar resides in. Then add that path
(c:\navstar in my example) to your PATH environment variable.
Consult your DOS manual for details on how to do this.
Finally, use the Navinst installation program to
configure Navstar to your taste. Then reboot to make the
changes in your AUTOEXEC.BAT file take hold.
Navstar 1.0
4
Navstar's Screen Display
Upon invoking Navstar at the DOS prompt, you will see
several things. In this section we will discuss them, and
what they mean to you.
The Files
---------
The first thing you will see is a list of files in the
current directory. The files will be listed in lower case, 88
on a screen, 4 columns across. Don't worry about the order
they are displayed in; you can change that to taste later.
Directory entries have their names preceded by a '\'
character, and files with hidden, system, volume, or
read-only attributes will have these attributes displayed as
follows:
filename.ext [HRS]
If none of the attributes are present, the brackets will not
be displayed at all.
The Current & Logged Path
-------------------------
In the lower left hand corner, you will see two paths
displayed, the current path and the logged path. The current
path is the path which currently has its files displayed on
the screen. The logged path is just that; it is the current
working directory as far as DOS and Navstar are concerned.
These two separate paths stem from their counterparts in
command-line DOS: You may be in C:\TEMP\TEMP2 (which would be
your logged path) and type DIR C:\TEMP (which would be your
current path). The power of having separate paths will become
apparent later when you learn to manipulate files, so don't
worry if it is a bit unclear now.
The Pages Line
--------------
There is a line in the lower left hand corner which
reads:
Page X of Y
What this means, logically enough, is that you are currently
displaying page X of Y possible pages of files. Pages of
files are a necessary and convenient way to handle
directories of more than 88 files.
Navstar 1.0
5
The Sort Type & Order
---------------------
Again in the lower right hand corner, you will see 2
characters bracketed by > and <. The two characters within
describe what the current sort type and order. The
possibilities are as follows:
Sort Type:
N File Name
E File Extension
S Files Size
D File Date
U Unsorted
The sort order has only two possibilities: ascending and
descending. Ascending is signified by a '+', and descending
by a '-'. So you will see something like >N+<, meaning the
files are sorted by name, in ascending order.
An extra note about sort order is needed here regarding
volume labels and directory entries. Volume labels are always
assumed to come "first" in any sort order, followed by any
directory entries. Within a directory, each subdirectory
entry will be sorted by name, regardless of the current sort
order and type. Further, the parent entry ".." will always be
displayed as the first directory entry.
The Logged Drive
----------------
Yet another piece of information displayed in the lower
right hand corner is the currently logged drive. Normally you
can disregard this; it is only important if you will be use
Navstar to peruse disks across multiple drives. In this case,
the logged drive determines to what drive you will be
returned to when you exit Navstar. The logged drive also
informs you which volume's directory tree information is
currently in memory.
Navstar 1.0
6
Navigation & The Cursor
-----------------------
Upon starting up, you will notice that the upper-left
hand corner entry is highlighted in some fashion. That is
because the cursor is currently residing there. There are
many ways to move the cursor, and we will now discuss a few
of them. The arrow keys: these work as you might expect, with
up, down, left, and right moving you in the expected
directions. Experiment with them to get a grasp on how they
wrap around; it is easier to see than to explain. Basically,
holding any one of the four down will eventually traverse an
entire screen.
Home and End: these keys move you to the first entry and
the last entry of the current screen.
PgUp and PgDn: these keys move you two the previous or
next screen of files, respectively. These do NOT wrap
around at all.
Control Home & Control End: these keys move you to the
first and last pages of files.
Tab/Control-S: Filename Character Search
------------------------------------
Navstar has one further method of navigating among the
files in a directory: textual search. This is a very useful
method becomes it allows you to quickly find a particular
file, regardless of the current sort method.
To invoke the text search feature, press the Tab key or
Control-S. Now, in the lower left hand corner, the message
"Scan: " will appear. Now type in a character. One of two
things will happen. If a filename starting with that
character can be found, the cursor will jump to the necessary
page and highlight the first matching occurrence, and the
character will appear in the Scan line. If there is no
filename starting with that character, Navstar will beep, and
the character will not be added to the Scan line. This
behavior will continue until you press a key which is not one
of the following: [0-9], [a-zA-Z], or a period.
A special situation occurs when the period is the first
character typed: the following characters are compared to
file extensions only. For instance, the sequence:
Tab/Control-S .exe ESCAPE will leave the cursor positioned at
the first .exe file on the screen forward of the original
cursor position.
The last point is an important one: the text search
function searches from the current cursor position forward;
it does not reset to the beginning of the screen/pages when
invoked.
Finally, BackSpace can be used to edit the Scan line.
Navstar 1.0
7
The File Information Line
-------------------------
The last part of the screen display to be explained is
the file information line. This is the line between brackets
in the lower right hand corner. Notice as you move the
cursor, the content of this line changes. This line contains
pertinent information about the file the cursor is currently
residing on. By pertinent information we mean the following:
size, time of creation, date of creation. For most files this
is enough. For directory entries, instead of a file size, the
string "<DIR>" is substituted. For volume labels, the string
"<VOL>" is substituted.
Navstar 1.0
8
Informational Keystrokes
The '/' and '?' keys: Help
--------------------------
These two keys, as you might have noticed, reside on the
same physical key. So, for convenience sake, both invoke the
help screen. The help screen is, by design, very minimal. It
primarily lists available keystrokes and the functions
associated with them. Pressing the same key again will bring
up the title menu, while pressing any other key will clear
the menu.
The 'I' key: Information
------------------------
Pressing the 'I' key will bring up a three line display
of pertinent information. For instance: free space on disk,
current time & date, max number of files & directories, and
so on. Pressing any other key will return you to the command
level.
The 'K' key: Defined Keys and Extensions
-------------------------------------------------------
Pressing this key will bring up the first of two
screens. First, it will bring up a list of all the Function
Keys and Alternate Function Keys, with each's associated
current definition. Pressing any key except 'E' will return
you to the command level, while pressing an 'E' will take you
to the second information screen. This screen contains the
recognized filename extensions and their associated command
lines. Key definitions and extensions will be covered later;
for now it is enough to know this key exists.
Navstar 1.0
9
Commands which Alter Navstar's Current Attributes
The 'N': Changing to a New Directory
------------------------------------
This is a fairly straightforward command; if you
understand how DOS's chdir command works, you understand how
the 'N' command works, with a few limitations. When you press
the 'N' key, it will ask you for a new directory
specification. For the most part, the 'N' command works as
though you were at the command line in the logged directory
and typed in cd <new directory spec>. The limitation is that
you cannot use the .. or . filenames in specifying a new
directory. This is not so great a limitation as it might
seem, thanks to Navstar's built in mechanisms to traverse
directory structures, which will be shown later. Navstar
evaluates such directory specifications in a variety of ways.
The following rules apply:
1) If the filespec includes a drive designation, it is
used as is, with no expansion. Note that DOS itself may
perform some interpretation, depending on the logged
directory of the specified drive.
2) If the filespec begins with the '\' character, the
filespec is appended to the current drive, and no
further interpretation is done.
3) If the filespec does not begin with the '\'
character, but is not empty, the filespec is appended to
the currently logged path.
4) If the filespec is empty, the current path is used.
Navstar 1.0
10
The 'J' key: Jump to a Matching Directory
-----------------------------------------
This Jump function is an extraordinarily powerful means
to navigate DOS's directory structure. After pressing 'J',
Navstar will prompt for a target string. After you enter this
target string, Navstar will search its internal Jump table
for matches. A match is a pathname with a directory entry
starting with the target string. For instance, the target
string "uti" would match:
\utils
\temp\utility
\help\utils\tmp
If no matches are encountered, you will be informed and the
function will abort. If a single match is found, Navstar will
change the current directory to the match.
If more than one matches are found, the first will be
displayed. Use the up and down arrow keys (as well as Home
and End) to scroll through the list of matches until you find
the desired entry. WHen you find it, hit return. Doing so
will cause Navstar to change to the selected directory.
A drive specifier may be used in specifying the target
string. When a target string is of the form "x:<string>", two
things happen. First, Navstar logs "x" as the current drive.
Then it proceeds as if the target string had been entered in
the above example. Even if you use the escape key to abort
the Jump operation, you will still find yourself logged onto
drive "x".
In order for the jumpdir function to work, the data file
CCD.DAT must have been created in the volume's root
directory. If the file does not exist, this function will not
work. Use the Control-J function (see following) to create
the data-file.
Control-J: Updating the Jump Table:
-----------------------------------
When you press Control-J, Navstar executes the command
line "CCD -r". As explained in the section of this manual
concerned with the CCD program, this causes the jump data
file on the current logged volume to be updated.
The 'L' key: Log the Current Directory
--------------------------------------
This is exactly what it sounds like; whatever the
current directory path is, it becomes the logged path also.
The logged drive is changed if necessary. If the logged drive
changes, Navstar will read that volume's directory info into
the Jump table.
Navstar 1.0
11
The 'W' key: Swap Current and Logged Paths
------------------------------------------
This is a somewhat strange and counter-intuitive
function which is included because I found it extraordinarily
useful. It does exactly what it seems; it swaps the current
and logged paths, changing the display accordingly.
The 'O': Change the Sorting Method
----------------------------------
Pressing this key will toggle the sorting method based
on the current one in the following progression:
name
extension
size
unsorted
The display will be updated accordingly.
Control-O: Toggle Ascending/Descending Sort Order
-------------------------------------------------
This will toggle the current sorting method between
ascending and descending and the display will be updated as
necessary. Notice this has no effect on an unsorted
directory.
Control-A: Change the Current Attribute Mask
--------------------------------------------
Pressing this key allows you to edit the attribute mask
which determines what files are displayed/available for
manipulation by Navstar.
Control-R: The Refresh Screen Key
---------------------------------
This key redraws the screen. It is provided as a means
to clean up the screen after TSR's which do not do so after
they have been invoked.
Navstar 1.0
12
Commands for manipulating files
The ' ','+','-' & Insert Keys: Marking files
--------------------------------------------
In order to manipulate files, you need a way to mark
specific files. Navstar provides several ways to do this.
Pressing the space bar marks the current file; the file
will begin to blink. When you move the cursor off of this
file, the file will be shown as marked by a different screen
attribute (color).
The '+' and '-' keys are used to mark a large group of
files. When you press either of the, the first thing that
happens is all files & directory entries in the current
directory are unmarked. If the '-' key was pressed, that is
all that happens. If the '+' key was pressed, all files (but
*not* directories) are marked, on all pages.
Finally, the Insert key allows for a very flexible
method of marking files. When you press the Insert key, you
toggle off and on the 'marking' mode. When you turn on
marking mode, the file the cursor is on will be marked. Any
other files you subsequently move across will also be marked.
The 'C' Key: Copying Files
--------------------------
This is possibly the most used function in Navstar's
repertoire. As you would think, it is a powerful method for
copying files across the directory structure of a disk. It is
both simple and powerful, and can take some understanding if
you wish to use some of the more advanced possibilities.
First, in order to copy a file or group of files, you
must mark the file(s) you wish to copy. The press the 'C'
key. Navstar will then ask you for the destination file
specification. Notice you are simply specifying the path into
which another copy of each marked file will be copied!!! You
cannot change the name of a file using the copy command.
Navstar evaluates such destination filespec's in a
variety of ways, depending on the filespec. The following
rules apply:
1) If the filespec includes a drive designation, it is
passed to DOS as is, with no expansion. Note that DOS
itself may perform some interpretation, depending on the
logged directory of the specified drive.
2) If the filespec begins with the '\' character, the
filespec is appended to the current drive, and no
further interpretation is done.
3) If the filespec does not begin with the '\'
character, but is not empty, the filespec is appended to
the currently logged path.
4) If the filespec is empty, the logged path is used.
Navstar 1.0
13
It is this last option which is so convenient; by
manipulating the current and logged directories cleverly,
copying becomes a trivial process.
The 'B' Key: Backup Files
-------------------------
In the above description of the copying command, it was
noted that the copy command does not allow you to create
another copy of a file with a different name. To do this, you
would use the Backup Files command. When the 'B' key is
pressed, for each marked file, Navstar will ask for a new
filename. This will create a new copy of a marked file with a
new name, in the same directory.
The 'M' key: Move Files/Make Directory
--------------------------------------
The 'M' key is the only command key in Navstar which
does double duty. Depending on whether there are any files
marked, it either invokes the Move Files command or the Make
Directory.
With some number of marked files, Navstar will ask for a
destination file specification, which works just as in the
Copy command. It then proceeds just as in the copy command,
except it deletes the source file after the copy has been
completed. However, if the file is being moved within a
single volume, instead of copy the entire file, Navstar will
use the DOS rename function to move it; this is significantly
faster.
If there are no files marked, Navstar will ask for a new
directory entry, which will then be created in the *current*
directory.
The 'R' Key: Renaming Files & Directories
-----------------------------------------
When the 'R' key is pressed and there are files marked,
Navstar will ask the you, for each marked file, the new
filename. Note you cannot use rename to move files, as it
only allows the user to edit the filename, not the pathname.
Navstar 1.0
14
The 'D' Key: Deleting Files & Directories/Global Verify
-------------------------------------------------------
When the 'D' key is pressed and there are marked files,
Navstar will first query you if you are sure you wish to
progress. If the user responds positively, Navstar then
proceeds to delete each marked file. If Navstar encounters a
marked directory entry, it will halt and query you if you
wish to delete the entry. After taking the appropriate
action, Navstar then proceeds on with the deletion process.
Navstar will not delete a non-empty directory, nor will it
delete the currently logged directory.
Control-D: Deleting Files & Directories/Individual Verify
---------------------------------------------------------
When the Control-D key is pressed and there are marked
files, Navstar then proceeds to delete each marked file. For
each file or directory, Navstar will query you if you wishes
to delete the entry. After taking the appropriate action,
Navstar then proceeds on with the deletion process. Navstar
will not delete a non-empty directory, nor will it delete the
currently logged directory. This method provides an
additional safety net for deletion over the 'D' command if
the you so wish.
The 'A' Key: Alter File Attributes
----------------------------------
When the 'A' key is pressed and there are marked files,
the File Attribute Edit Line appears. This line allows you to
alter the Hidden, System, and Read Only attributes for the
marked files. After you select the attribute contribution you
desire, the attribute of each marked file will be altered
accordingly. Note that sometimes, this action will cause
files to become hidden from the viewing directory, since it
may no longer match the attribute mask currently active.
Navstar 1.0
15
Commands for Executing Programs
The 'S' Key: Invoking the System
--------------------------------
When you press the 'S' key, Navstar will ask you for a
command line. When you hit return, Navstar will invoke a new
shell of COMMAND.COM with the command line as its parameter.
Simply hitting return when asked for a command line will
invoke a new shell and leave you at the DOS prompt. Typing
"exit" will return you to NAVSTAR.
In general, using the System option is a very
inefficient way to do business; primarily, it is given as a
means to access DOS's internal commands, such as DIR (but
why?) in case they are needed.
Execution Command Line Expansion
--------------------------------
Invoking the system shell is one method of running
programs; however it is not always the most efficient.
Indeed, it is seldom the most efficient. It takes less memory
to simply use DOS's built-in "spawn" command. The only thing
that "spawn" cannot do that invoking a shell can is any
internal DOS command, such as DIR & CHDIR. Since most of
these other functions can be accomplished better and faster
by Navstar itself, Navstar provides a multitude of niceties
for spawning programs. These will be discussed at length
throughout the rest of this section.
When Navstar is given a command line for execution, it
performs a significant amount of parsing. The major effect of
parsing is the replacement of the following keys in the
following manner:
1) (*) anytime an asterisk appears between parentheses,
Navstar will replace (*) with the full marked filename,
including the pathname.
2) (!) anytime an exclamation point appears between
parentheses, Navstar will replace (!) with the marked
filename, *not* including the pathname.
3) (..) anytime this appears, it adds all the marked
file names (but not pathnames) to the command line. This
is especially useful for editors which allow editing
multiple files.
3) (?) anytime a question mark appears between
parentheses, Navstar will query you for a string, then
replace (?) with the string.
Navstar 1.0
16
For instance, the following command line:
edit (*)
Would be expanded to:
edit c:\temp1\temp2\file1
assuming file1 was marked, and the current directory is
c:\temp1\temp2.
Further, there is a set of execution modifiers. If the
last parameter of a command line is a string enclosed in
parentheses not equal to any of the expansion modifiers, it
must be composed of the following:
nop
chto
chback
chcurr
ovl
sys
The nop option instructs Navstar not to pause for a
keystroke when the command line is finished executing.
Normally, Navstar will pause.
The chto option instructs Navstar to change directories
to the directory of the program being executed. The program
being executed must have its pathname fully specified.
The chback option simply instructs Navstar to return to
the currently logged directory after executing the command.
It is generally used along with a chto command.
The chcurr option changes the current directory to match
the logged directory after the command line has been
executed.
The ovl option instructs Navstar to replace itself with
the program in question; this option obviously does not allow
you to return directly to Navstar when the program
terminates.
The sys option forces Navstar to invoke COMMAND.COM to
execute the command line. This allows for DOS internal
commands and redirection.
For instance:
c:\wp\word (*) (chto,chback,nop)
tells Navstar to execute c:\wp\word with a marked filename as
a parameter, and to change to c:\wp before execution begins,
change back after execution, and not to pause after
execution.
Some caveats are in order. Navstar parses by spaces, so
spacing is critical. For instance, wp/setup will return an
error. It should be wp /setup in order to allow Navstar to
proceed correctly. Also, do not forget that the file to be
executed must have its pathname completely specified for the
"chto" option to work correctly. Finally, use the (!) instead
of the (*) option whenever possible, since it will take up
substantially less space. DOS has an imposed limit of 128
characters for a command line, and Navstar observes this.
Navstar 1.0
17
The 'X' Key: Execute with Parameters
------------------------------------
When this key is pressed, Navstar simply prompts for a
command line and then executes it according to the guidelines
specified above.
The '*' Key: "Hot" Execute
--------------------------
When the '*' key is pressed and there are some number of
marked files, each file which is marked will be executed,
with no parameters. This is useful for running multiple
little utilities. If no files are marked, this command is
identical to the 'X' command.
RETURN: The Action Key
----------------------
When return is pressed, several things can happen. If
the cursor entry is a subdirectory, Navstar will add that
subdirectory to the current path and update the display
accordingly. If the entry is '..', Navstar will move up one
level on the directory tree and the current path and the
display will be updated accordingly.
If the entry is a file, and the extension is .COM, .EXE,
.BAT, or one of up to fifteen other recognized extensions, it
will immediately be executed. The recognized extensions are a
facet of Navstar which are modified using the Navinst
installation program. Conceptually, they are very simple. You
are allowed to set up to fifteen extensions; associated with
each is a command line. If a file of a matching extension is
in question, its associated command line is executed as if
the current file had been marked.
There is a special extension, '.***', which has some
special connotations attached to it. If, during installation,
a command line is installed for this extension, it becomes
the "default" command line. What this means is, if you hit
<RETURN> on a file, and that file's extension is not .COM,
.BAT, or .EXE, and its extension does not match any extension
occurring before the '.***' definition, the command line
matched with '.***' will be used. In this way, it becomes a
catch-all extension. This extension, when defined, also
matches all files without any extension at all.
The 'V' Key: Viewing Files
--------------------------
Pressing the View key invokes the command line you have
defined as the View command line. See the next section
"Definable Keys" for a complete description.
Navstar 1.0
18
The 'E' Key: Editing files
--------------------------
Pressing the Edit key invokes the command line you have
defined as your editor. See the next section "Definable Keys"
for a complete description.
Navstar 1.0
19
Definable Keys
--------------
Navstar supports twenty-two user-definable keys. These
are F1 through F10, Alt-F1 through Alt-F10, 'E', and 'V'.
These, as with the extensions, are defined using the Navinst
installation program. Again, as with the extensions, they are
conceptually simple. Simply put, each key can be assigned a
command line, as was discussed previously. Then, when a key
is pressed, the effect is as if you had pressed 'X' and then
typed in the key definition. Any command line which can be
executed using the 'X' command can be saved as a defined key.
Exiting Navstar
---------------
To exit Navstar, simply hit the Escape key.
Navstar 1.0
20
Examples
This section is intended as a help for those who wish some
examples in creating and using Navstar's command line
execution features, including recognizable file extensions
and definable keys. The examples are drawn from Navstar as it
would be configured using the supplied file "data.nav".
Recognizable Extensions
-----------------------
Example 1:
Notice the extension/command-line pair:
".mak" & "make -f(*)"
This is an example of an extension which I used in developing
Navstar. What this means is that when the Action key (Return)
is pressed on an entry with the file extension ".mak",
Navstar will mark that entry, and execute the command line
"make -f(*)". This will be interpreted like this. "make" will
be tested to see if a "make.com", "make.exe", or "make.bat"
can be found on the default search path. If so, it will
become the first parameter in the call to DOS's EXEC() call.
the second parameter, "-f(*)" will be expanded; the (*) will
be replaced by the full filename of the entry. The command
"make -f<filename>" tells the make program I use to process
the make according to the dependency info in <filename>. So
you can see how this is useful.
Example 2:
Notice: ".wp", "invokewp.bat (*) (nop,chback)"
This is an example of a file extension which comes in handy
everyday. The ".wp" corresponds to the extension used by my
word-processor, so when I press the Action Key on a file with
this extension, it executes the command line "invokewp.bat"
with a single parameter, that of the current filename. The
"nop" option tells Navstar not to pause after execution has
been completed. The "chback" option tells Navstar to return
the logged directory to the currently logged one when
execution has ben completed. I use a batch file to invoke my
word-processor because I want it to do a couple other little
things before executing the word-processor itself.
Navstar 1.0
21
Definable Keys
--------------
Example 1:
Look at the definable key F9, "grep (?)".
This is another one I use almost constantly. By pressing F9,
Navstar will make "grep" the first argument, and then, upon
encountering the "(?)" argument, it will query you for an
argument line. That line will then be parsed as is and
executed. For example, I might hit:
F9 "gstring *.c"
in order to search for each occurrence of a call of my get
string routine in each C file in the currently logged
directory.
Example 2:
This example is one no owner of Navstar will want to exclude.
See the entry:
c:\utils\navinst (chdir,ovl)
This is a highly useful entry as follows. When invoked, it
will execute Navstar's installation program, Navinst. Prior
to execution, it will change to the c:\utils directory (that
is where I keep my Navstar & Navinst executables), thanks to
the "chdir" option. Finally, the "overlay" option tells
Navstar to replace itself in memory with Navinst. That way,
when you have finished modifying Navstar, it will leave you
at the DOS prompt, where by typing Navstar you will be in the
new, modified version of Navstar.
Navstar 1.0
22
The Navinst Installation Program
General Comments
----------------
Navinst, Navstar's Installation program, allows you to
alter several of the basic operating characteristics of
Navstar. It, like Navstar itself, has a fairly mundane
interface. Single keystrokes select options; the Escape key
removes you from trouble and ends operations. Some of the
options, like recognizable extensions and definable keys, are
merely useful to use; you do not have to take advantage of
these if you do not wish it. Others, like color settings, are
a near necessity depending on the display you are using.
Invoking Navinst
----------------
Invoking Navinst is simple. Simply type Navinst at the
DOS prompt and hit return (alternatively, move Navstar's
cursor over Navinst and hit return :-)!!!!). When you do
this, Navinst will look for a file named "navstar.exe" in the
currently logged directory. It aborts if it doesn't find one.
Alternatively, there are three command line options
which can be used. The -E<filename> switch tells Navinst to
use <filename> instead on "navstar.exe" as the executable to
be configured. The -D<filename> switch tells Navinst to use
<filename> instead of "data.nav" as the default data file
name. Finally, the -B option runs Navinst in batch mode. In
batch mode, it simply uses the default data file (or
specified one) to make the needed changes to the default
executable file (or the specified). This is useful if you
have multiple configurations which you use at different
times.
Main Menu
---------
The Main Menu provides you with 11 options. They are:
'K' --> Modify Key Definitions
'C' --> Modify Colors
Control-O --> Modify Sort Order
'O' --> Modify Sort Method
'E' --> Modify Recognized Extensions
'A' --> Modify Global File Attribute
'V' --> Modify Setting of Video Mode
'M' --> Modify Max Number of Files Allowed
'D' --> Modify Max Number of Directories Allowed
'R' --> Read in a Configuration File
'?' --> Help Screen
Escape --> Exit Navinst
Navstar 1.0
23
The 'K' Key: Modify Key Definitions
-----------------------------------
This key will display the twenty function key
definitions, and the current definition of the View and Edit
keys. Pressing any of the keys shown will result in Navinst
asking you for a new definition. Pressing escape while
entering a definition will clear the definition. After you
have entered the definition, Navinst will update the screen
accordingly. Navinst will then wait for another key to be
pressed. If Escape is pressed, Navinst will return to the
Main Menu.
The 'C' Key: Modify Colors
--------------------------
This key will bring a screen with the four types of
screen attributes used by Navstar. The four attributes are:
Normal: used for filename display and other mundane
things.
Highlighted: used for text and messages which need to be
emphasized.
Cursor: used for the cursor.
Marked: used to show an entry has been marked.
Pressing any of (NCHM) will allow you to edit the
corresponding color; for instance, N allows you edit the
Normal attribute. You edit said attribute by using the Up and
Down arrow keys. There are 128 possibilities for you to
choose from for each attribute. Escape ends the editing, as
might be expected. Escape again returns you to the Main Menu.
Control-O: Modify Sort Order
----------------------------
This will allow you to toggle between Ascending and
Descending order as the default sort order. Simple, yes?
Escape returns to the Main Menu.
The 'O' Key: Modify Sort Method
-------------------------------
This key will allow you to cycle through the four
sorting methods. Escape again returns you to the Main Menu.
Navstar 1.0
24
The 'E' Key: Modify Recognized Extensions
-----------------------------------------
Here you are allowed to change the extensions which
Navstar will recognize and their corresponding command lines.
You press a key between A and O to choose which one, then
fill in the extension and the command line. DO NOT forget the
period at the start of the extension!!!!!! Escape returns you
to the Main Menu.
The 'A': Modify Global File Attribute
-------------------------------------
At this screen you can change the default file attribute
Navstar will use when reading and displaying a directory.
Press (HRS) to toggle Hidden, Read-Only, and System. Escape
or Return end and save the attribute. 'A' sets all three
attributes true, while 'C' clears all attributes. Escape
again returns you to the Main Menu
The 'V' Key: Modify Video Mode
------------------------------
There are two types of video writing used in Navstar.
Fast uses direct screen RAM updates. This is the preferred
method; the only case in which it should not be used is in
systems using older CGA cards. Such cards require you use the
Slow setting to prevent 'snow' appearing on the screen.
The 'M' Key: Modify Max Number of Files Allowed
-----------------------------------------------
When this key is pressed, Navinst will display the
current Maximum number of files which are allowed in a
directory. Normally this number is 1024. The Up and Down
arrows allow you to increase/decrease this value. If you find
you have some exceedingly LARGE directories, you can increase
this value to about 25000 in increments of 64; you can
decrease it similarly. If Navstar is unable to allocate space
for the requested number of files, it will beep upon reading
a directory. It will then halve the number of entries
requested repeatedly until it has room. This is a crude
method indeed; you should adjust the value using Navinst. The
Escape key will return you to the Main Menu.
Navstar 1.0
25
The 'D' Key: Modify Max Number of Directories Allowed
-----------------------------------------------------
This key will allow you to specify the maximum number of
directories which will be maintained in Navstar's Jump table.
If it is set too high, you will be wasting space. Too low,
and not all of your directories will be entered into the
table. Use CCD or a similar program, estimate your needs.
The 'R' Key: Read in a Configuration File
-----------------------------------------
Pressing this key will result in Navinst prompting you
for a filename to read in. This must be in the proper file
format or you will get unpredictable results. How do you get
a file in the proper format? Read on, this is covered in the
section on Exiting Navinst.
The '?' Key: Help Screen
------------------------
Obvious, right? Ok, if you are still confused, try it.
It won't bite, I promise.
Escape: Exiting Navinst
-----------------------
Exiting Navinst is bit tricky. Upon pressing Escape at
the Main Menu, Navinst will ask you if you wish to write out
a new .EXE file, with the changes. If you answer 'Y', the
file will be written, if you press Escape, it will not.
Following that question, Navinst will ask if you wish to
save a configuration file. If you respond with a 'Y', Navinst
will prompt for the name of the file. If you press Escape, it
will not.
Navinst will now exit.
Navstar 1.0
26
The CCD Change Directory Program
When I was developing the code for the Jump Directory
function in Navstar, I did not do so within Navstar itself.
Instead, I wrote and tested it separately as a command line
change directory program. This program evolved into CCD,
modestly called "Chris's Change Directory". CCD uses the same
interface as Jump does in Navstar; refer to the section on
the Jump function for a description as to how to use it.
However, CCD provides some additional functionality.
First, CCD is the means used to update the directory
list file CCD.DAT. This file, which resides in the root
directory of a volume, contains a list of all directories for
that volume. To create the file, either run CCD when the file
is nonexistent, or run CCD with the -r option. This option
forces CCD to update the file for the current volume. CCD -r
is the command line used by the Control-J command in Navstar
to update the Jump table.
CCD has one other option, -c. This option gives back
useful count information, such as the number of files for a
volume, number of directories for a volume, max number of
files in a single directories, etc. It can also be combined
with the -r into CCD -rc, which will redo the CCD.DAT file
and give the tabular information.
Navstar 1.0
27
The Navshell Program
Navshell is another useful little program which performs
the nice feat of allowing Navstar to run in an even smaller
amount of RAM. Specifically, it consumes a mere 7k when
configured properly. Configuration involves setting the
NAVSTAR environment variable as shown in the Installation
section. The only detriment to using Navshell instead of
Navstar directly is a slight loss in speed, since Navshell
must reload a copy of Navstar each time a program is run. On
faster systems, with nice hard disks, this is barely
noticeable. Try it, particularly with Navstar on a Ramdisk.
You will like it!!! This is also the way to use Navstar if
you have extended or expanded memory. Use the extra memory
as a Ramdisk, and put Navstar on it. This will enable
Navstar to load quickly, yet still only use 7k of RAM.
Navstar 1.0
28
The Disklist Program
Another program included with Navstar is Disklist.
Disklist is a way for you to list all the files and/or
directories for a particular volume. For instance, you can
ask for the list to be sorted in ascending order by date per
directory, or perhaps in descending order by size for files
only. Disklist outputs to standard output, so its output can
be redirected to a file easily.
Disklist command format can be found by executing
'Disklist ?' at the command line. Primarily, there are three
main types of options. First, to control the sort type and
order:
-n: sort by name (default)
-e: sort by extension
-s: sort by size
-t: sort by date -d: switch to descending
Second, to control output format:
(default) show files per directory
-d: show directory entries only
-f: show all files as one list
Third, to change the root:
-pXXX: where XXX is the pathname to use as root
(default) root of volume.
This is an extremely useful command for disk
maintenance. I use it for periodic housecleaning of machines
which are used by multiple people. After generating the list,
I can go over the list with both parties, then use Navstar to
delete the offending files.
Navstar 1.0
29
License Agreement
This section tells you is how to become a registered
user once you decide that you like the program and want to
use it on a regular basis.
Navstar is distributed under the shareware marketing
concept; it is not free software and it has not been released
to the public domain. The documentation, executable images,
and all other files distributed with Navstar are copyrighted.
Shareware is a way of distributing computer software
that allows you to try out a program before you purchase it.
Programs distributed as shareware typically give you some
period of time to use the program and evaluate its usefulness
to you. If the program doesn't meet your needs, you're under
no obligation to pay for it. If you do find the program
useful and wish to continue using it on a regular basis, the
shareware program's author usually requests that you pay for
the program by sending him or her a completed registration
form and payment. This is the approach I have taken in making
Navstar available to the public.
If you find Navstar to be a useful addition to your
software library, you're requested to become a registered
user by completing the enclosed registration form and
returning it along with the indicated license/registration
fee. I hope that you will agree that the $30.00 license fee
is a small price to pay for the continued use of the program.
It requires a large investment to develop, market, and
support a product of this complexity. Your support in the
form of a license/registration fee will continue to make good
software available at low prices.
Quantity discounts are available to business,
government, and other organizations that wish to use Navstar
on multiple computer systems. Navstar is also available at
very special rates to organizations who wish to use it in
promotional campaigns. Write the author for information on
using the program this way.
You are granted a limited license to use and examine
Navstar on a trial basis to determine if Navstar is suitable
for your needs. If you find Navstar useful and continue to
use it on a regular basis, you should complete and return the
registration form along with the indicated
license/registration fee.
Navstar 1.0
30
You are encouraged to make copies of Navstar for the
trial use of other individuals and organizations, subject to
the following restrictions:
1) All Navstar distribution files must be copied in
unmodified form, including the documentation, help, and
executable image files.
2) You may not include any other files with the
distributed copy.
3) You may not request compensation of any sort for
providing the copy. This restriction does not apply to
computer clubs and user groups who distribute software
to their members for a nominal fee.
You may not distribute Navstar with any other product or
service without written permission of the copyright holder.
Navstar may be included on electronic bulletin board
systems for downloading by users of the bulletin board
provided the above restrictions are met.
Navstar and all accompanying materials are provided "as
is" without warranty of any kind. The entire risk of using
Navstar is assumed by you.
The author, Christopher R. S. Schanck, makes no warranty
of any kind, expressed or implied, including but not limited
to any warranties of merchantability and fitness for a
particular purpose.
In no event will the author, Christopher R. S. Schanck,
be liable for any damages whatsoever arising out of your use
or inability to use the program.
If you use Navstar on a regular basis, you should
complete the registration form at the end of this document
and return it along with the indicated license/registration
fee. Registration gives you the right to use the software as
documented in the license.
The registration fee of $30.00 establishes you as a
registered user of Navstar. You will not receive any software
directly from the author, but you will, from time to time,
receive notification when updated versions of Navstar are
released.
When you submit your registration fee, however, you can
request that the author mail you a copy of the current
version of Navstar and accompanying documentation on disk
(3.5" or 5.25") for free. This offer is made for mailing
addresses in the continental United States only.
Navstar 1.0
31
The Navstar registration form appears at the back of
this document. For your convenience, the same form is also
contained in the file REGISTER.NAV, which can easily be
printed.
The source for Navstar is available on a case-by-case
basis; contact the author if you are interested.
Navstar 1.0
32
Registration Form - Navstar 1.1
Remit to: Christopher R.S. Schanck
364 W. Lane Ave.
Columbus, OH 43201
Work Phone: 814-421-7051
Navstar 1.1 April 1989
Navstar Registration .............. @ $ 30.00 each $ _____
Disk size, circle one: ( 3.5" / 5.25" )
Navstar printed Documentation ..... @ $ 15.00 each $ _____
Subtotal $ _____
Overseas shipping ................. @ $ 10.00/item $ _____
Total (U.S.Funds) $ _____
Name: _____________________________________________________
Company: __________________________________________________
Address: __________________________________________________
___________________________________________________________
___________________________________________________________
Day Phone: _________________________
Eve: _______________________________
Prices subject to change without notice.
Navstar 1.0
33
Registration Form - Continued
I acquired Navstar 1.1 from
[ ] - Friend [ ] - Computer Club
[ ] - Electronic BBS
[ ] - Other - Please Specify
________________________________
I would also appreciate any input you would care to give
concerning Navstar. If you have any ideas or comments that
would make Navstar a better program, then please let me know.
Navstar 1.0
34
The Author
I am currently a graduate student in Computer Science,
pursuing a PhD. As such, I expect to be in school forever. I
was born in a steel town in Eastern Pennsylvania, and
attended The Pennsylvania State University as an
undergraduate, graduating in May of 1988. I hold a first-
degree Black Belt in Tae Kwon Do, and I am an avid reader of
science-fiction. I am always interested in hearing feedback
on Navstar; to contact me use the same address given above in
the licensing/registration section.
Navstar 1.0
35
Acknowledgements
There are many I should acknowledge for the inspiration
for writing this program: family, friends, colleagues. In
addition, I want to thank Borland for their excellent TurboC
compiler, which I used to write Navstar; IBM for making my
beloved baby, lo those many years ago; and all the other
folks who wrote software I used to create Navstar. And
finally, thanks to all my computer science professors, who
instilled the knowledge to write such a utility in me, often
against my will.
Navstar 1.0
36