home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
SWITCH2.ZIP
/
SWITCH.DOC
< prev
Wrap
Text File
|
1990-01-22
|
2KB
|
45 lines
10/19/89 Darien Mann (GENIE D.MANN4)
Mytree and switch provide an equivalent function to the Norton
Utilities Norton Change Directory. The Presentation Manager File System
creates complex directory trees which require much typing of
pathnames when working from a command prompt. Since NCD only works for
real mode, I had to provide a solution for protected mode.
Mytree produces a listing of directories to standard out, each with a
full path name on a newline to facilitate later reading with fgets().
Use this program, redirecting the output to the root directory -
mytree > c:\tree.txt
The switch program will reference this tree.txt for faster searching of
matching subdirectories.
For switch, the full directory name must be typed. Once a match is
found in tree.txt, the full pathname is supplied, the current directory
is changed, and DosExecPgm is called to provide a command prompt in the
new directory. DosExecPgm is used because I don't know how to issue a
change directory command to the original command prompt, or session,
which started the switch program. Each call of CMD.EXE uses about 30K
of RAM. To return to the previous directory, type exit.
As directory trees change, mytree will have to be run again to create
an updated directory listing.
REVISIONS:
10/19/89
added searching for partial directory names
added bypass if the match is the current directory
Will continue searching for another match. If none is found,
will exit with no change.
10/21/89
added DosGetMachineMode to allow binding of the program.
Now works in DOS_MODE or OS2_MODE!
1/22/90
created make files and definition files.
added NEWFILES statement to definition files for compatibility with
long file names under OS/2 1.2 high performance file system.
filename arrays are now 256 bytes.
included source and .exe to findfile