@echo off

REM
REM Run the SVM application. If SVM exits with an error code of 1,
REM call the FTPD server to implement file backup.
REM
ECHO -- -------------------------- -- >%DTADISK%\Startup.log
ECHO -- -- Daughter board config - -- >>%DTADISK%\Startup.log
ECHO -- -------------------------- -- >>%DTADISK%\Startup.log
CD \
%DTADISK%\BDINFO.EXE >>%DTADISK%\Startup.log

:START
ECHO -- -------------------------- -- >>%DTADISK%\Startup.log
ECHO -- --  Samsung Voice Mail  -- -- >>%DTADISK%\Startup.log
%DTADISK%\SVM.EXE -v >>%DTADISK%\Startup.log

CD \
%DTADISK%\SVM.EXE
IF NOT ERRORLEVEL==1 GOTO SVM_END

REM ECHO -- -------------------------- --
REM ECHO -- --  FTPD File Transfer  -- --
REM ECHO -- -- Press ESC, X to exit -- -- 

ECHO -- --------------------------------------------- --
ECHO -- --------------------------------------------- --
ECHO -- -- -- -- -- FTPTEST File Transfer -- -- -- -- --
ECHO -- -- Send "Quote site custom unload" to exit -- --
ECHO -- --  --  SVM will automatically restart  -- -- --
ECHO -- -- -- --   on proper FTP Exit above  -- -- -- --
ECHO -- --------------------------------------------- --
ECHO -- --------------------------------------------- --

%SOCKETS%\FTPAPI.EXE
%SOCKETS%\FTPTEST QUIET CUSTOM

GOTO START

:SVM_END
