@echo off

cls

echo Detecting RAMDRIVE
echo set ramd=%%3>ramdrive.bat
findramd.com|find /i "ramdrive">detdrive.bat
call detdrive.bat

echo Copying files to RAMDRIVE %ramd%
copy /y *.* %ramd% > NULL
%ramd%
mopac -d fullfw.cmt fullfw.mot
if errorlevel 1 goto FailMopac

echo Updating BMC Firmware
call update.bat
goto end

:FailMopac
echo Unpacking failure encountered  

:end
