home *** CD-ROM | disk | FTP | other *** search
/ On Hand / On_Hand_From_Softbank_1994_Release_2_Disc_1_1994.iso / 00083 / s / 123 / crsby.bat < prev    next >
DOS Batch File  |  1993-09-20  |  4KB  |  146 lines

  1. @REM **************************************
  2. @REM * 123R4W Software-By-Wire Batch File *
  3. @REM **************************************
  4. @echo off
  5. @if $%echo_flag%$==$$ set echo_flag=OFF
  6. @echo %echo_flag%
  7.  
  8. set DRIVE=
  9. set DEST=
  10. if $%1$ == $$ goto usage
  11.    set DRIVE=%1
  12. if $DRIVE$ == $$ echo Unable To Set DRIVE Environment Variable.
  13. if $DRIVE$ == $$ goto usage
  14.    shift
  15. if $%1$ == $$ goto usage
  16.    set DEST=%1
  17. if $DEST$ == $$ echo Unable To Set DEST Directory Environment Variable.
  18. if $DEST$ == $$ goto usage
  19.    goto doshift
  20.  
  21. :chkopt
  22.    if $%1$ == $$ goto chkdir
  23.    if $%1$ == $START$ goto startcp
  24.    goto doshift
  25.  
  26. :doshift
  27.    shift
  28.    goto chkopt
  29.    goto doshift
  30.  
  31. :chkdir
  32. if exist %DEST%\*.* goto echohdr
  33. md %DEST%
  34. echo *** Dir Check *** > %DEST%\chk.dir
  35. if not exist %DEST%\chk.dir goto errwdir
  36. if exist %DEST%\chk.dir del %DEST%\chk.dir
  37. goto echohdr
  38.  
  39. :errwdir
  40. echo Error : Cannot Create Directory %DEST%
  41. goto copyerr
  42.  
  43. :echohdr
  44. echo ******************************
  45. echo *  123R4W Software-By-Wire   *
  46. echo ******************************
  47.  
  48. copy crsby.bat %DEST%\.
  49. %DEST%\crsby %DRIVE% %DEST% START
  50.  
  51. @REM Copy Each Install Disk
  52. :startcp
  53.  
  54. :disk1
  55. ECHO 
  56. ECHO Insert Disk 1 in DRIVE %DRIVE%
  57. pause
  58. ECHO Copying All Files from Disk 1 to %DEST% . . .
  59. XCOPY %DRIVE%\*.* %DEST%\*.* /s /e /v
  60. if errorlevel 1 echo Error : Copying Disk 1
  61. if errorlevel 1 goto copyerr
  62.  
  63. :disk2
  64. ECHO 
  65. ECHO Insert Disk 2 in DRIVE %DRIVE%
  66. pause
  67. ECHO Copying All Files from Disk 2 to %DEST% . . .
  68. XCOPY %DRIVE%\*.* %DEST%\*.* /s /e /v
  69. if errorlevel 1 echo Error : Copying Disk 2
  70. if errorlevel 1 goto copyerr
  71.  
  72. :disk3
  73. ECHO 
  74. ECHO Insert Disk 3 in DRIVE %DRIVE%
  75. pause
  76. ECHO Copying All Files from Disk 3 to %DEST% . . .
  77. XCOPY %DRIVE%\*.* %DEST%\*.* /s /e /v
  78. if errorlevel 1 echo Error : Copying Disk 3
  79. if errorlevel 1 goto copyerr
  80.  
  81. :disk4
  82. ECHO 
  83. ECHO Insert Disk 4 in DRIVE %DRIVE%
  84. pause
  85. ECHO Copying All Files from Disk 4 to %DEST% . . .
  86. XCOPY %DRIVE%\*.* %DEST%\*.* /s /e /v
  87. if errorlevel 1 echo Error : Copying Disk 4
  88. if errorlevel 1 goto copyerr
  89.  
  90. :disk5
  91. ECHO 
  92. ECHO Insert Disk 5 in DRIVE %DRIVE%
  93. pause
  94. ECHO Copying All Files from Disk 5 to %DEST% . . .
  95. XCOPY %DRIVE%\*.* %DEST%\*.* /s /e /v
  96. if errorlevel 1 echo Error : Copying Disk 5
  97. if errorlevel 1 goto copyerr
  98.  
  99. @REM Copy SBY install.ini
  100. :sbyini
  101. if not exist %DEST%\sby.ini echo Error : Missing file %DEST%\sby.ini
  102. if not exist %DEST%\sby.ini goto copyerr
  103. copy %DEST%\sby.ini %DEST%\install.ini
  104.  
  105. @REM Copy Files to SBY Programs Directory
  106. :progdir
  107. md %DEST%\programs
  108. if not exist %DEST%\readme.txt echo Error : Missing file %DEST%\readme.txt
  109. if not exist %DEST%\readme.txt goto copyerr
  110. copy %DEST%\readme.txt %DEST%\programs\.
  111. if errorlevel 1 goto copyerr
  112. if not exist %DEST%\ivcw.dll echo Error : Missing file %DEST%\ivcw.dll
  113. if not exist %DEST%\ivcw.dll goto copyerr
  114. copy %DEST%\ivcw.dll %DEST%\programs\.
  115. if errorlevel 1 goto copyerr
  116. if not exist %DEST%\123w.ri echo Error : Missing file %DEST%\123w.ri
  117. if not exist %DEST%\123w.ri goto copyerr
  118. copy %DEST%\123w.ri %DEST%\programs\.
  119. if errorlevel 1 goto copyerr
  120.  
  121. :finished
  122. echo Finished Creating Software-By-Wire Directory.
  123. goto done
  124.  
  125. :copyerr
  126. echo Unable to Finish Creating Software-By-Wire Directory.
  127. goto done
  128.  
  129. :usage
  130. echo  
  131. echo 123R4W Software-By-Wire Batch File
  132. echo  
  133. echo Note: If you have not done so already, you must
  134. echo record your Name and Company Name on these
  135. echo disks by running Install before you use CRSBY
  136. echo  
  137. echo USAGE: CRSBY [ SOURCE DRIVE ] [ DESTINATION ] 
  138. echo   eg:   CRSBY a: d:\sby
  139. goto done
  140.  
  141. :done
  142. echo  
  143. echo Done!
  144. set DRIVE=
  145. set DEST=
  146.