From:	BUC::WINNINGHAM   "Jim Winningham #5452.51 8*343-1243" 17-MAY-1988 09:22
To:	ARISIA::EVERHART,WINNINGHAM  
Subj:	DIR.COM

$!
$!
$!                         D I R E C T O R Y . C O M
$!                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~
$!
$!                             by Jim Winningham
$!
$!                              September, 1986
$!
$! This is a generic directory change program that will work from any of
$! your directories providing you establish a line in your login.com file that
$! will show a path to this file.  
$!
$! A significant feature of this program is that you can change your 
$! directories all around at any time and you never have to change this 
$! program.  Anytime you create or delete a directory, you don't have to
$! worry about modifying this program.
$!
$! This program can also be used to access other special files or programs
$! with a few modifications.
$!
$!                                  S E T U P
$!                                 ~~~~~~~~~~~
$!
$! Example to you use in your LOGIN.COM file: (In other words, PATH)
$!
$!   $ D :==@Your_disk:[Your_Name.Your_sub_dir]Directory.Com
$!
$!  Note:  You have to change the name in the "[ ]" to the directory where
$!         Directory.Com will reside. (Any of your directories)
$!
$! Then you could just enter `D' from any of your directories and it will
$! prompt you for a directory name.
$!
$!                               C O M M A N D S
$!                              ~~~~~~~~~~~~~~~~~
$!
$! Generally the commands are the same as the SET DEFAULT commands except
$! you do not have to enter the brackets etc.  YOU CANNOT CHANGE DISKS
$! or ROOT DIRECTORIES with this program the way it is written.
$!
$! 1.  "Directory_name"
$! 2.  "Directory_name.Sub_directory_name"
$! 3.  Null (Return only)  -- sends you home
$! 4.  "<"   Takes you back up the directory tree one level
$! 5.  "DF"  Will SHOW DEFAULT and give a directory
$!
$! If you want to go directly to a sub directory of a sub directory from
$! your present one, enter Sub_name.Sub_sub_name. (Ex: Flowers.roses)
$! Otherwords, you must enter the full path (excluding the root) of the next 
$! directory sub-level. This works best if your directories don't go too
$! deep.  If your directories are many layers deep, then you should remove
$! the line in the main program that says SET DEFAULT sys$login.  With this
$! change, lateral moves cannot be made without going back up the tree one
$! step.
$!
$!
$!                          M A I N   P R O G R A M
$!                         ~~~~~~~~~~~~~~~~~~~~~~~~~
$!
$     IF P1 .EQS. "" THEN INQUIRE P1 "DIRECTORY " ! It stops to ask you
$                                                 ! which directory you
$                                                 ! want?
$!
$     IF P1 .EQS. "" THEN GOTO HOME_DIR           ! If you hit return without
$                                                 ! entering anything, it
$                                                 ! will branch to the sub-
$                                                 ! routine "home directory".
$!
$     IF P1 .EQS. "DF" THEN GOTO SET_PROMPT       ! This way it can change
$                                                 ! to indicate the prompt
$                                                 ! that you are actually
$                                                 ! in.
$!
$     IF P1 .EQS. "<" THEN GOTO UP_ONE            ! This takes you back
$                                                 ! one level.
$!
$! 
$     SET DEFAULT sys$login                       ! Back to your root dir.
$!
$     SET DEFAULT [.'P1']                         ! If you entered a sub-
$                                                 ! directory name, it will set
$                                                 ! the default directory to
$                                                 ! that name. 
$!
$!
$!                          S E T   P R O M P T
$!                         ~~~~~~~~~~~~~~~~~~~~~
$!
$ SET_PROMPT:
$     SET PROMPT="''f$directory()'  "             ! This makes the prompt
$                                                 ! be whatever directory
$                                                 ! you are in. However,
$                                                 ! if you are in someone
$                                                 ! elses directory it will
$                                                 ! read as if you were
$                                                 ! still in one of
$                                                 ! yours.
$!
$     DIR/COL=1/SIZE/DATE/PROTECTION              ! This makes it print
$                                                 ! the directory in a single
$                                                 ! column when you get
$                                                 ! there. 
$!
$     EXIT                                        ! End of program. Go back
$                                                 ! to DCL.
$!
$!                             U P   O N E
$!                            ~~~~~~~~~~~~~
$!
$ UP_ONE:
$     SET DEFAULT [-]                             ! Go back one directory
$     SET PROMPT="''f$directory()' "              ! level and give you a 
$     DIRECTORY                                   ! directory
$     EXIT
$!
$!                      H O M E   D I R E C T O R Y
$!                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
$!
$ HOME_DIR:
$     SET DEFAULT sys$login
$     SET PROMPT="''f$directory()' "              ! Here it will name the
$     DIRECTORY *.DIR                             ! root directory and 
$     EXIT                                        ! it gives a directory of
$                                                 ! your sub directories.
$!
$!
