@echo off
cls
rem  This is version 1.25 of this file
echo .
echo .
echo . create an RxDOS boot floppy
echo . -----------------------------------------------
echo .

set RxDOS_MAKESILENT=0
if %1==-s goto RunSilent
if %1==-1 goto RunSilent
goto CheckParameters

:RunSilent
set RxDOS_MAKESILENT=s
shift

:CheckParameters
if %1x==x goto Help
if %1==h goto Help
if %1==help goto Help
if %1==-h goto Help
if %1==-help goto Help
if %1==? goto Help
if %1==-? goto Help

if %1==a: goto GoMake
if %1==A: goto GoMake
if %1==b: goto GoMake
if %1==B: goto GoMake
goto Bad_Parameter

:GoMake
if not exist rxdosbio.sys goto Cant_Copy
if not exist rxdos.sys goto Cant_Copy
if not exist rxdoscmd.exe goto Cant_Copy

if %RxDOS_MAKESILENT%==s goto AutoWrite

echo . do you want to write to disk %1 ?
echo . (control-C to abort)
pause 
cls

dir/w %1
echo . ------------------------------------------------
echo . Any files above this line ?
echo .
echo . Disk in drive %1 should not have any files
echo . and should be formatted.  The above directory
echo . will help you decide whether you want to erase
echo . all files.
echo .
echo . If there are any files you must delete them.
echo . continue ?
echo . (control-C to abort)
pause 

echo .
echo . rxd_boot first places a boot program on disk.

:AutoWrite
rxd_boot -1 -%RxDOS_MAKESILENT% %1

echo .
echo .
if exist %1\rxdosbio.sys del %1\rxdosbio.sys
if exist %1\rxdos.sys del %1\rxdos.sys
if exist %1\rxdoscmd.exe del %1\rxdoscmd.exe
echo . copying rxdosbio.sys %1
copy rxdosbio.sys %1  >nul
echo . copying rxdos.sys %1
copy rxdos.sys %1     >nul
echo . copying rxdoscmd.exe %1
copy rxdoscmd.exe %1  >nul

if not exist %1\config.sys copy config.def %1\config.sys
if not exist %1\autoexec.bat copy autoexec.def %1\autoexec.bat

echo . copy completed.
dir/w %1
goto Done

:Cant_Copy
echo .
echo . Could not find one or more of these files:
echo .   rxdosbio.sys, rxdos.sys, rxdoscmd.exe
echo .
echo . (you must run makeboot from the rxdos files directory)
goto Done

:Bad_Parameter
echo .
echo . Bad parameter  '%1'
if %1==a echo . (should be %1:)
if %1==A echo . (should be %1:)
if %1==b echo . (should be %1:)
if %1==B echo . (should be %1:)
echo .
echo .

:Help
echo . Help info:
echo . ------------------------------------------------
echo .
echo . makeboot drive:
echo . (please be sure to use the trailing colon)
echo .

:Done
