home *** CD-ROM | disk | FTP | other *** search
/ RBBS in a Box Volume 1 #3.1 / RBBSIABOX31.cdr / educ / edit.bat < prev    next >
DOS Batch File  |  1983-06-30  |  884b  |  32 lines

  1. bat * General purpose edit caller *
  2. bat * Enter here the name of editor to call:
  3. bat    %0 = EDLIN
  4.  
  5. bat * Make sure editor is somewhere
  6. bat    STATEOF %0.COM%c
  7. bat    IF %R <> 1 SKIP 4
  8. bat    STATEOF %0.EXE%b
  9. bat    IF %R <> 1 SKIP 2
  10. bat    TYPE The editor could not be found on any diskette!
  11. bat    EXIT
  12.  
  13. bat * Setup drive # where editor really is:
  14. bat    IF %R <> 0 %0 = %R:%0
  15.  
  16. bat * Serch for the file to be edited...
  17. bat    %c =
  18. bat    STATEOF %1%c
  19. bat    IF %R <> 9  SKIP 3
  20. bat      TYPE The filename to edit is invalid.
  21. bat      TYPE Reenter command . . .
  22. bat      EXIT
  23. bat    IF %R <> 1 %1 = %c
  24.  
  25. bat * Now enter the DOS command to do the edit
  26. bat *     and also pass any operands the user typed.
  27. bat * By stacking the command, this batch file can be
  28. bat *     terminated so DOS won't need to re-access it
  29. bat *     just to find the end of file mark.
  30. bat STACK %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
  31. bat EXIT
  32.