@echo off
REM %1 is source diskette number
REM %2 is source drive followed by colon
REM %3 is source file name
REM %4 is rename file name

Rem home directory is the destination where file should be copied

:RETRY

Rem if file to copy not found on source give an error
if not exist %2\%3 goto err

Rem
Rem !!!!!! Rename commented for Update. Used for Beta release only. !!!!!!!
Rem

Rem if file not already renamed then rename it
echo Rename %3 to %4

Rem rename the source if one exists
if exist %3 ren %3 %4 > nul

Rem file stil exists then rename failed. Something is wrong
if exist %3 goto RenErr

Rem copy the file to destination
echo copy %2\%3
copy %2\%3 > nul

Rem copied file not found, copy failed. Something is wrong
if not exist %3 goto CopyErr

goto FINISH

:ERR
echo 様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
echo.
echo File to copy: %2\%3
echo File not found on the source disk.
echo Please insert Disk #%1 - Release #2  1993.
echo.
echo 様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
echo.
pause
goto RETRY

:RenErr
echo 様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
echo.
echo ERROR during rename of Source file to Target file.
echo Source file: %3        Target file: %4
echo Current working directory is:
cd
echo.
echo Possible reason(s) for this error are:
echo    - Insufficient rights on network
echo.
goto SetErr

:CopyErr
echo 様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
echo.
echo ERROR during copy of Source file.
echo File: %2\%3
echo Current working directory is:
cd
echo.
echo Possible reason(s) for this error are:
echo    - Insufficient disk space on target drive
echo. 
goto SetErr

:SetErr
echo.
echo Please record this error message.
echo Please try to resolve this situation. If you need assistance, contact
echo Technical Support and read this error message to them.
echo After this problem has been resolved, run UPDATE again.
echo.
echo UPDATE will now automatically run UNUPDATE to remove any changes made.
echo.
echo 様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
echo.
pause
%2\Seterr 251
goto finish

:FINISH

