Dec 142017
 
GO utility v3.0 fast switch to directory and drive.
File GO3.ZIP from The Programmer’s Corner in
Category File Managers
GO utility v3.0 fast switch to directory and drive.
File Name File Size Zip Size Zip Type
GO.DOC 5364 2089 deflated
GO.EXE 8688 4468 deflated

Download File GO3.ZIP Here

Contents of the GO.DOC file


GO
Goto specified drive/directory command

Placed in the Public Domain by
Woody Woodward
June 1987
Ver. 3.0 July 1991

(See end of file for version history)

GO allows changing the default drive and/or current directory within
a single command line. The syntax is extremely flexible:

go [drive][:][\][pathname]

GO may be used like the standard CD command to change the current
directory of the default drive. GO also permits use of the '/'
symbol in place of '\'. The following statements are equivalent:

cd \bin\utils
go \bin\utils
go /bin/utils

GO can also be used to change the default (logged) drive:

go d:
go d
andd:

will all switch to D: as the default drive placing you in the current

directory last defined for that drive. With GO the colon (:) is
optional.

To change both the default drive and its current directory, enter the
full pathname as follows:

go d:\bin\utils
go d: bin\utils
go d \bin\utils
go d bin\utils

As you can see, GO is very flexible concerning the drive and
directory delimiters. The rules are simple and there is only one
prohibition.

To delimit the drive specifier, use a colon (:) or one or more spaces
after the drive letter.

To delimit the directory pathname, use a slash (/), backslash (\),
one or more spaces, or nothing in front of the pathname.

The single prohibition is a drive letter followed immediately by a
slash (or backslash) character. There must be a colon or a space
between a drive letter and the start of the directory pathname.

Version 2.0

Each time GO is invoked, it will set an environmental variable (LDIR)
to contain the full drive/pathname of the current active directory.
When GO is invoked with no parameters it will change to LDIR. Thus,
typing GO with no target pathname will return you to the last active
drive and directory. Typing GO a second time (with no target
pathname) takes you back to where you had just come from. Used this
way, GO acts as a toggle between two different drive/directories.

With this feature, GO can also be used in batch files to record the
current "home" directory, perform additonal directory changes, and
return "home" upon completion of the batch file. To do this, use GO
to make the first directory change - this stores the "home" directory
in LDIR. Subsequent directory changes are made with the standard DOS
command CD, rather than GO. (This preserves the value of LDIR.)
Before exiting the batch file, invoke GO one more time with no target
pathname - this will change directory back to "home" as defined in
LDIR.

CAUTION: To keep the size of GO.EXE to a minimum, there is no error
checking performed when SETting the DOS environment. You should
insure that your environment area is large enough to hold the LDIR
variable string. The easiest way to do this is by adding a SET
command to your autoexec.bat file:

SET LDIR=make_this_string_as_big_as_your_longest_path

If this statement is executed before loading any programs that remain
resident (MODE, PRINT, GRAPHICS, etc.), DOS will expand the
environment area to accommodate it.

(Another way to expand the environment is via the SHELL= statement in
your CONFIG.SYS file. Refer to your DOS manual.)

SUGGESTION: Because GO is an external executable program, it takes
longer to invoke than DOS's internal CD. If you use a RAM disk on
your system, the performance of GO can be greatly improved by placing
GO.EXE in that drive and including the drive letter in your standard
PATH.

Version 3.0

The original version of GO employed an undocumented DOS interrupt
call (2eH) to modify the master DOS environment. It appears that
certain operating environments (such as 4DOS and NDOS) do not support
this mode of operation very well. As an alternative, you can now
trigger GO to use a safer (albeit slower) method - keeping track of
the last directory in a disk file (vs. the DOS environment).

To use the new method, simply create an environmental variable called
GODIR - for GO DIRECTORY. The variable should define the path and
filename you want to use to store the "last directory" information.
For example:

set godir=c:\bin\dirfile

will instruct GO to look in the C:\BIN directory for a file called
DIRFILE. This will be the file that stores your last active
drive/directory. If GODIR is found in the DOS environment, GO will
use the disk file method. If not found, GO will use the faster DOS
environment method.

Suggestion for RAM disk users: You will enjoy a significant increase
in performance by storing both GO.EXE and your "last directory" disk
file in the RAM drive.


 December 14, 2017  Add comments

Leave a Reply