@echo off
IF EXIST NDOS.COM GOTO OKAY
IF EXIST NDD.EXE GOTO OKAY
IF EXIST RESCUE.EXE GOTO OKAY
IF EXIST SFORMAT.EXE GOTO OKAY

echo Can't find NDOS.COM, NDD.EXE, RESCUE.EXE, or SFORMAT.EXE.
echo Be sure you are in the correct directory.
goto END

:OKAY
rem Remove old backups
IF EXIST .\BACKUP\NDOS.COM DEL .\BACKUP\NDOS.COM
IF EXIST .\BACKUP\NDD.EXE DEL .\BACKUP\NDD.EXE
IF EXIST .\BACKUP\RESCUE.EXE DEL .\BACKUP\RESCUE.EXE
IF EXIST .\BACKUP\SFORMAT.EXE DEL .\BACKUP\SFORMAT.EXE

rem Actually patch the thing
DOS62UPP DOS62UP

rem Remove the files that were extracted and the patch file itself
DEL DOS62UP.RTP > NUL
DEL DOS62UPP.EXE > NUL
DEL DS62UP.EXE > NUL
echo.
echo.
echo The old copies of your changed files and an UNPATCH program
echo have been saved in a subdirectory called BACKUP
echo.
rem Remove this file
DEL DOS62UP.BAT > NUL
:END
