home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / larcos.zip / EXAMPLES.ZIP / LARCBUP.BAT < prev    next >
DOS Batch File  |  1994-05-15  |  6KB  |  160 lines

  1. @ECHO OFF
  2. REM ============================================================================
  3. REM 
  4. REM LARC-S "LARC Examples"
  5. REM LARC-D "Source Library Backup Batch File"
  6. REM LARC-V "100"
  7. REM
  8. REM Revision history:
  9. REM kbg 05/15/94 100 - Created.
  10. REM
  11. REM Some general notes about this file follows.
  12. REM
  13. REM This batch file is executed you select "backup library source files" from
  14. REM the "Release" menu.  The batch file is responsible for creating a complete
  15. REM backup of just the files that are present in the currently selected LARC
  16. REM source library.
  17. REM
  18. REM This batch file is started by LARC and LARC passes the following parameters:
  19. REM 
  20. REM     %1 = Argument 1 contains the two character hard drive name (i.e., "C:").
  21. REM
  22. REM     %2 = Argument 2 contains source file directory name (i.e., "C:\LARCEMP").
  23. REM
  24. REM     %3 = Argument 3 contains current system date formatted as mm-dd-yy.
  25. REM
  26. REM     %4 = Argument 4 contains current system time formatted as hh:mm:ss.
  27. REM
  28. REM     %5 = Argument 8 contains the three character source library number.
  29. REM         This number can be used to backup the LARC control files
  30. REM         (MODCTL.nnn, RELCTL.nnn, REVCTL.nnn) that belong with the
  31. REM         current library.
  32. REM
  33. REM LARC allows you complete freedom over how your product is backed up.  Since
  34. REM LARC executes this standard DOS command batch file, you can use any
  35. REM combination of system commands to backup the sources.
  36. REM
  37. REM Normally, ECHO OFF is set to keep things like REM lines from being
  38. REM scrolled up the screen.  Then ECHO commands are used to display progress
  39. REM messages.  
  40. REM
  41. REM ============================================================================
  42.  
  43.  
  44.  
  45.  
  46. REM ============================================================================
  47. REM Display some initial information on the screen.
  48. REM
  49. REM Use Ken's File Deletion utility with the "/N" option to delete any existing
  50. REM files with being prompted before the delete.  Notice that this entire
  51. REM process will use the C:\LARC3\TEMP directory.  You can use any directory
  52. REM name.  However, if you were to backup directly to an off-line media, such
  53. REM as tape, then you might need to replace this delete command with appropriate
  54. REM tape formatting or initialization commands.
  55. REM ============================================================================
  56. ECHO.
  57. ECHO Source Library Backup Command File
  58. ECHO.
  59. ECHO Delete all files from the temporary work directory C:\LARC3\TEMP...
  60. KDEL/N C:\LARC3\TEMP\*.*
  61.  
  62.  
  63.  
  64.  
  65. REM ============================================================================
  66. REM Now a file will be created and printed that describes the contents of the
  67. REM backup set.  This file should be stored with the backup set to help you
  68. REM identify the contents at a future date.
  69. REM ============================================================================
  70. ECHO.
  71. ECHO Creating READ.ME file containing notes of the backup files...
  72.  
  73. ECHO.                                    > C:\LARC3\TEMP\READ.ME
  74. ECHO         Source Backup Diskettes for LARC Examples        >> C:\LARC3\TEMP\READ.ME
  75. ECHO         Created %6 at %7                     >> C:\LARC3\TEMP\READ.ME
  76. ECHO.                                    >> C:\LARC3\TEMP\READ.ME
  77. ECHO         This backup contains:                    >> C:\LARC3\TEMP\READ.ME
  78. ECHO.                                    >> C:\LARC3\TEMP\READ.ME
  79. ECHO             READ.ME        This file            >> C:\LARC3\TEMP\READ.ME
  80. ECHO             SOURCES.ZIP    Source files            >> C:\LARC3\TEMP\READ.ME
  81. ECHO             *.%5        LARC system control files    >> C:\LARC3\TEMP\READ.ME
  82. ECHO             SYSLOG.ZIP    LARC system activity log file    >> C:\LARC3\TEMP\READ.ME
  83. ECHO.                                    >> C:\LARC3\TEMP\READ.ME
  84.  
  85. PRINT C:\LARC3\TEMP\READ.ME
  86.  
  87.  
  88.  
  89.  
  90. REM ============================================================================
  91. REM Create a ZIP file containing all of the source files.
  92. REM ============================================================================
  93. ECHO.
  94. ECHO Zip the source files...
  95. PKZIP C:\LARC3\TEMP\SOURCES.ZIP C:\LARCSRC\EXAMPLES\*.*
  96.  
  97.  
  98.  
  99.  
  100. REM ============================================================================
  101. REM Copy the LARC control files for your library into the temporary
  102. REM directory as a safeguard.  This will get the control files stored
  103. REM it the exact state as when the backup was created.
  104. REM ============================================================================
  105. ECHO.
  106. ECHO Copy the LARC control files...
  107. COPY C:\LARC3\*.%8 C:\LARC3\TEMP\*.* >NUL
  108.  
  109.  
  110.  
  111.  
  112. REM ============================================================================
  113. REM Copy the LARC system activity log file for your library into the temporary
  114. REM directory.  This will save the current state of the activity log file in
  115. REM case you need to investigate LARC activity through the point when the backup
  116. REM was created.
  117. REM ============================================================================
  118. ECHO.
  119. ECHO Zip the LARC activity log file...
  120. PKZIP C:\LARC3\TEMP\SYSLOG.ZIP C:\LARC3\SYSLOG.*
  121.  
  122.  
  123.  
  124.  
  125. REM ============================================================================
  126. REM Create the backup diskettes using Ken's File Copy utility to copy the files
  127. REM from the temporary directory to diskette A:.  You would, of course, replace
  128. REM this command with the commands neccessary to copy the files to your backup
  129. REM media.
  130. REM ============================================================================
  131. ECHO.
  132. ECHO Start copying the zipped source files to the backup diskettes
  133. ECHO in drive A:.  Make sure that each diskette is labeled:
  134. ECHO.
  135. ECHO         LARC Hello Example Source Backup
  136. ECHO         Created %6
  137. ECHO         Diskette 1 of n
  138. ECHO.
  139. KCOPY C:\LARC3\TEMP\*.* A:
  140.  
  141.  
  142.  
  143.  
  144. REM ============================================================================
  145. REM Remove the last diskette an make sure that all diskettes have been
  146. REM properly labeled.
  147. REM ============================================================================
  148. ECHO.
  149. ECHO Remove the last diskette from drive A: and make sure that
  150. ECHO each diskette is properly labelled and write protected!
  151.  
  152.  
  153.  
  154.  
  155. REM ============================================================================
  156. REM Finally, we delete the files from the temporary directory.  This step
  157. REM may be unnecessary if you backup directly to your backup media.
  158. REM ============================================================================
  159. KDEL/N C:\LARC3\TEMP\*.*
  160.