@ECHO OFF
ECHO.
ECHO Preparing the update folder.
SET d=ASTRONICS\R8000
IF NOT EXIST \ASTRONICS MD \ASTRONICS
IF NOT EXIST \%d% MD \%d%0
IF NOT EXIST \%d%\update MD \%d%\update
pushd \%d%\update
FOR %%f IN (*.r8a) DO DEL %%f
FOR %%f IN (*.md5sum) DO DEL %%f
popd
ECHO Copying the update files.
ECHO.
COPY %d%\R8000_UPDATE_04070000_04070100\* \%d%\update
IF %ERRORLEVEL% == 0 GOTO End
ECHO.
ECHO An error occured.
ECHO.
pause
:End
