home *** CD-ROM | disk | FTP | other *** search
-
- Tom Jennings
- World Power Systems/Fido Software
- Box 77731
- San Francisco
- CA 94107
-
- June 90
-
-
- ----------------
- HOW TO USE:
-
- GO Harmlessly lists some basic information
- to remind you how it all works, and to
- plug the author (me).
- GO ? Displays the list of available
- directories.
- GO = Re-enters the last-entered
- drive/subdirectory.
-
- GO name Log into the named drive.
-
- ----------------
- REQUIRED:
-
- GO.EXE the program, what else
- GO.MAP sample map file (see text)
- GO.DOC guess what
- GO=<map path> DOS environment variable "GO", so GO.EXE
- can find the text file.
-
- ----------------
- WHAT IT DOES:
-
- Lets you name your hard disk subdirectories and "GO" to that
- name, instead of long, cumbersome, error-prone CHDIR pathnames
- and drive letter changes.
-
- It also has one cute feature that remembers the last drive/subdir
- you were on, so that when you boot up later, it logs you back in
- there. (Optional of course.)
-
- ----------------
- WHY:
-
- I don't know about you, but I have two hard disks (C: and D:),
- and a zillion subdirectories on each. Mine are arranged by
- project; about half have another level of subdirectories, and
- some of those have even more.
-
- Traversing them is a pain in the neck. When changing from one to
- the other, I have to remember which drive I'm on, change drives,
- then CD or CHDIR to the right subdir, getting all the \'s and
- suchlike correct.
-
- Not only that, if you have more than one hard disk, you can
- invoke that unpleasant, obscure DOS side effect of the "logged in
- subdir" on another drive; ie. when you're currently on D:, and
-
- you say "CHDIR C:\FOO\BAR", then later you do a "DIR C:"
- (thinking you'll get the list of files in the drive's root
- directory) you get the contents of C:\FOO\BAR instead. Yuck.
-
- ----------------
- HOW TO INSTALL:
-
- First, set the environment variable "GO", which GO.EXE uses to
- locate the file that contains all these. For example ...
-
- SET GO=C:\BIN\GO.MAP
-
- SET command in your AUTOEXEC.BAT file, so it's set upon bootup.
- GO.EXE will complain if it can't find the things it wants.
-
- Next -- the text file itself (example here: GO.MAP) contains the
- list of names (that you enter as your destinations) and full path
- specifiers (that GO.EXE actually goes to). They are arranged one
- per text line, with space(s) between them. For example, here's
- part of my GO.MAP file:
-
- =c:\lastdir
- \ \
- c: c:\
- mslib c:\mslib
- mylib c:\mylib
- fidotools c:\fido\tools
- bin c:\bin
- dos c:\dos
- files c:\fidosw\files
- d: d:\
- book d:\fidobook
- pctex d:\pctex
- texinputs d:\pctex\texinputs
- homocore d:\homocore
- shipley d:\texts\shipley
-
- This is a "standard" (sic) MSDOS/CPM text file -- ASCII
- characters, each line terminated with CR/LF (13/10 decimal).
- End-Of-File Control-Z not needed but tolerated.
-
- Blank lines and lines beginning with semicolons (;) are ignored.
- Lots of blank lines and/or comments will slow the program down.
-
- GO is simple to use -- if you enter "GO FILES", Go will (1) open
- the file named in the "GO" environment variable, (2) search for
- the line containing "FILES" as the first word and (3) change to
- the subdirectory (second word), using these two rules:
-
- (a) If the new, target subdirectory is on the current,
- default drive, GO simply CHDIRs to the subdir. (ie.
- if you're in C:\FOO\BAR, it would simply do "CHDIR
- \FIDOSW\FILES")
-
- (b) If the new, target directory is on a drive other
- than the current, default drive, GO does first a
- "CHDIR \" to log into the root of the current drive,
- then changes drives, then CHDIRs to the subdir. (ie.
-
- if you're in D:\SUBDIR\BABBLE, it would do "CHDIR \"
- to log into the root, drive change D: to C:, then
- "CHDIR \FIDOSW\FILES".)
-
-
- You can manually change drives and/or subdirectories whenever you
- want to. You will not confuse GO.EXE.
-
- ----------------
- DOS ERRORLEVELS:
-
- GO.EXE returns ERRORLEVEL 0 when things go right, and 1 when
- things go wrong.
-
-
- ----------------
- WHAT ABOUT THAT FUNNY EQUAL SIGN (=)
-
- If you were observant, you noticed that the first line in my
- sample GO.MAP file is different than the rest. The presence of
- this line enables a fancy, optional feature: "remember the last
- drive/directory".
-
- The pathname after the "=" is the name of a disk file where GO
- will store the last-GO'd to subdir. The example here is a good
- one -- the root of the boot disk, though anywhere will do. The
- last-dir file is tiny, simply the name of the last logged
- directory. If you last entered "GO FILES", C:\LASTDIR would
- contain "FILES". (Note not the pathname "C:\FIDOSW\FILES".) It is
- a one-line text file.
-
- OK, so GO remembers the last GO'd to directory. How to use it?
-
- GO =
-
- When given "=" as a subdir name, it will use the contents of the
- =<pathname> from the GO.MAP file, and "GO" there.
-
- ----------------
- AND SO:
-
- If you use GO.EXE to do most or all of your directory changes (I
- do!), if you have ...
-
- GO =
-
- you turned your machine off.
-
- -- end
-