home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / games / fdraw2.zip / LIBRARY.BAT < prev    next >
DOS Batch File  |  1987-01-01  |  3KB  |  86 lines

  1. ECHO OFF
  2. GOTO EDIT
  3. REM
  4. REM ***************
  5. REM * LIBRARY.BAT *
  6. REM ***************
  7. REM
  8. REM This batch file creates a new library or adds symbols to an existing library
  9. REM The format for using this batch file is LIBRARY LIBNAME SYMBOL1 SYMBOL2 ...
  10. REM     where LIBNAME is the name of the library without the .LIB extension
  11. REM     and SYMBOL1 SYMBOL2 ... are the names of up to 8 symbol files without
  12. REM     the .SYM extension
  13. REM Example:
  14. REM LIBRARY MEDIA TV RADIO NEWSPAPR
  15. REM     This command would create a library called MEDIA.LIB which would
  16. REM     contain the symbols TV.SYM, RADIO.SYM, and NEWSPAPR.SYM.  If the library
  17. REM     already exists, this command would add the symbols to the library.
  18. REM
  19. :EDIT
  20. IF %1.LIB==.LIB GOTO ERROR1
  21. IF %2.SYM==.SYM GOTO ERROR1
  22. IF NOT EXIST %2.SYM GOTO ERROR2
  23. ECHO Starting library maintenance for %1.LIB
  24. IF EXIST %1.LIB GOTO HAVELIB
  25. ECHO We are creating a new library called %1.LIB
  26. ECHO We will start the library with the following symbol files:
  27. GOTO SYMBOL1
  28. :HAVELIB
  29. ECHO We will add the following symbol files to the library %1.LIB
  30. :SYMBOL1
  31. ECHO %2.SYM
  32. :SYMBOL2
  33. IF NOT EXIST %3.SYM GOTO ENDSYMS
  34. ECHO %3.SYM
  35. :SYMBOL3
  36. IF NOT EXIST %4.SYM GOTO ENDSYMS
  37. ECHO %4.SYM
  38. :SYMBOL4
  39. IF NOT EXIST %5.SYM GOTO ENDSYMS
  40. ECHO %5.SYM
  41. :SYMBOL5
  42. IF NOT EXIST %6.SYM GOTO ENDSYMS
  43. ECHO %6.SYM
  44. :SYMBOL6
  45. IF NOT EXIST %7.SYM GOTO ENDSYMS
  46. ECHO %7.SYM
  47. :SYMBOL7
  48. IF NOT EXIST %8.SYM GOTO ENDSYMS
  49. ECHO %8.SYM
  50. :SYMBOL8
  51. IF NOT EXIST %9.SYM GOTO ENDSYMS
  52. ECHO %9.SYM
  53. :ENDSYMS
  54. ECHO ON
  55. PAUSE Is this correct? Press any key to continue, Ctrl-Break to quit.
  56. ECHO OFF
  57. ECHO We are adding symbols to library %1.LIB
  58. IF EXIST %1.LIB GOTO OLDLIB
  59. COPY %2.SYM/B+%3.SYM+%4.SYM+%5.SYM+%6.SYM+%7.SYM+%8.SYM+%9.SYM %1.LIB/B
  60. GOTO END
  61. :OLDLIB
  62. COPY %1.LIB/B+%2.SYM+%3.SYM+%4.SYM+%5.SYM+%6.SYM+%7.SYM+%8.SYM+%9.SYM 
  63. GOTO END
  64. :ERROR1
  65. ECHO We cannot process your LIBRARY command.
  66. ECHO You may be using LIBRARY with the incorrect format.
  67. ECHO The correct format for using LIBRARY is -
  68. ECHO     
  69. ECHO     LIBRARY library-name symbol-name-1 symbol-name-2 ...
  70. ECHO     
  71. ECHO where 
  72. ECHO     library-name is the file name of the library without the
  73. ECHO     .LIB extension 
  74. ECHO and
  75. ECHO     symbol-name-1 symbol-name-2 ... 
  76. ECHO     are 1 to 8 file names for symbol files without the .SYM extension.
  77. GOTO FINI
  78. :ERROR2
  79. ECHO We cannot process your LIBRARY command.
  80. ECHO The 1st symbol file %2.SYM cannot be found.
  81. ECHO Please check the directory for the correct file name.
  82. GOTO FINI
  83. :END
  84. ECHO Library maintenance completed for library %1.LIB
  85. :FINI
  86.