home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / r / retain11.zip / RETAINCD.BAT < prev   
DOS Batch File  |  1992-12-10  |  1KB  |  37 lines

  1. echo off
  2.  rem ===RETAINCD.BAT, vs. 1.1, 10/12-92===
  3. echo --- RETAINCD 1.1 (c) 1992, Jim Groeneveld; RETAIN & CD combo.
  4.  rem (1) retains the current drive:subdir and
  5.  rem (2) changes drive and subdir to the first parameter
  6. if "%1"=="" goto help
  7. if "%1"=="?" goto help
  8. if "%1"=="/?" goto help
  9. if "%1"=="-?" goto help
  10.  
  11. :CDD
  12. call retain %2
  13.  rem command/c retain ;for DOS«3.3
  14.  rem Check for existence of [drive:][path] could be included here, but isn't.
  15.  rem To suppress DOS error messages if the parameter contains no drive, but
  16.  rem only a subdirectory specification: CTTY NUL .
  17. ctty nul
  18. %1\
  19.  rem No check for existence of drive.
  20. ctty con
  21. cd %1
  22.  rem Invalid directories are reported by DOS and do not need to be analyzed here
  23. goto end
  24.  
  25. :help
  26. echo.
  27. echo Syntax: 'RETAINCD drive┼path [aux-path[aux-file]│*│[/│-]?]', in which:
  28. echo drive    = drive specification to CD to, e.g. 'C:';
  29. echo path     = absolute (\[...[\...]]) or
  30. echo            relative   (...[\...]) path specification to CD to.
  31. echo     At least one of these (either drive or path) or both _must_ be specified.
  32. echo aux-path = drive:\subdir\ of auxiliary file $RETURN$.AUX, incl. trailing '\';
  33. echo aux-file = the eventual alternate auxiliary file name for $RETURN$.AUX;
  34. echo *        = list the currently stored paths (also with 'RETURN *');
  35. echo ? (or /? or -?) = display this help.
  36. :end
  37.