home *** CD-ROM | disk | FTP | other *** search
/ PC Plus 36 / ISSUE_36_SEP_1989 / SHORTIES / ADDPATH.BAT next >
Encoding:
DOS Batch File  |  1989-01-01  |  1.7 KB  |  61 lines

  1. echo off
  2.  
  3. :** ADDPATH.BAT  Ver 1.4  12/APR/1989  (c) M. Greenfield 1989 **
  4.  
  5. if %1@==@ goto addphelp
  6. if %1@==/P@ goto addpprev
  7. if %1@==/p@ goto addpprev
  8. if %1@==/L@ goto addplast
  9. if %1@==/l@ goto addplast
  10. if %1@==/R@ goto addprst
  11. if %1@==/r@ goto addprst
  12.  
  13. set addpathp=%path%
  14. path %1;%addpathp%;%2
  15. if %2@==@ path %1;%addpathp%
  16. if %1@==/E@ path %addpathp%;%2
  17. if %1@==/e@ path %addpathp%;%2
  18. set addpathl=%path%
  19. goto addpquit
  20.  
  21. :addplast
  22. path %addpathl%
  23. goto addpquit
  24.  
  25. :addpprev
  26. path %addpathp%
  27. goto addpquit
  28.  
  29. :addprst
  30. set addpathl=
  31. set addpathp=
  32. goto addpquit
  33.  
  34. :addphelp
  35. cls
  36. echo  ADDPATH HELP
  37. echo  ~~~~~~~~~~~~
  38. echo   This file allows path changes to be made from the keyboard without retyping
  39. echo   the whole of the path each time. Previous & Last paths are stored for reuse.
  40. echo  USAGE:
  41. echo   ADDPATH {addition}       ═» New-Path ═ {addition};Old-Path
  42. echo   ADDPATH /E {addition}    ═» New-Path ═ Old-Path;{addition}
  43. echo   ADDPATH {addition-1} {addition-2} ═»
  44. echo                            ═» New-Path ═ {addition-1};Old-Path;{addition-2}
  45. echo                   Note:
  46. echo                   The "additions" must conform to normal DOS path syntax,
  47. echo                   excluding the semicolons (;)  e.g.  C:\WORD\LETTERS
  48. echo.
  49. echo   ADDPATH /P   ═» New-Path ═ Previous-Path
  50. echo   ADDPATH /L   ═» Restores New-Path if it was modified by another program
  51. echo                   or after an ADDPATH /P command
  52. echo   ADDPATH /R   ═» Removes variables ADDPATHP & ADDPATHL from the environment 
  53. echo                   (these are used in the above two commands for restoring or
  54. echo                    returning to the previous path)
  55.  
  56. :addpquit
  57. echo Environment:
  58. echo  /P =%addpathp%
  59. echo  /L =%addpathl%
  60. path
  61.