@echo OFF
if "%1"=="" goto USAGE
if "%2"=="" goto USAGE
if "%3"=="" goto USAGE
set SUBOOTDIR=
if exist %1\suboot\system.dat set SUBOOTDIR=suboot
if exist %1\suboot.000\system.dat set SUBOOTDIR=suboot.000
if exist %1\suboot.001\system.dat set SUBOOTDIR=suboot.001
if exist %1\suboot.002\system.dat set SUBOOTDIR=suboot.002
if exist %1\suboot.003\system.dat set SUBOOTDIR=suboot.003
if exist %1\suboot.004\system.dat set SUBOOTDIR=suboot.004
if exist %1\suboot.005\system.dat set SUBOOTDIR=suboot.005
if exist %1\suboot.006\system.dat set SUBOOTDIR=suboot.006
if exist %1\suboot.007\system.dat set SUBOOTDIR=suboot.007
if exist %1\suboot.008\system.dat set SUBOOTDIR=suboot.008
if exist %1\suboot.009\system.dat goto TOOMANYSUBOOT
if "%SUBOOTDIR%"=="" goto NOSYSTEMDAT
if not exist %2\rplfiles\profiles\%3\LANMAN.DOS\LANMAN.INI goto NODATA
if exist %2\rplfiles\profiles\%3\suboot\system.dat goto HASCLIENTFILES
:DOCOPY
echo Updating client files on %2\rplfiles\profiles\%3 ...
if exist %2\rplfiles\profiles\%3\autoexec.bat del %2\rplfiles\profiles\%3\
autoexec.bat
if exist %2\rplfiles\profiles\%3\config.sys del %2\rplfiles\profiles\%3\
config.sys
mkdir %2\rplfiles\profiles\%3\suboot
if not errorlevel 0 goto COPYERROR
for %%i in (
autoexec.bat
config.sys
msdos.sys
protocol.ini
system.dat
win.bat
) do copy %1\%SUBOOTDIR%\%%i %2\rplfiles\profiles\%3\suboot\%%i
copy %1\%SUBOOTDIR%\*.dos %2\rplfiles\profiles\%3\suboot
if not errorlevel 0 goto COPYERROR
del %2\rplfiles\profiles\%3\suboot\protman.dos
if not errorlevel 0 goto COPYERROR
echo NOTE: Don't forget to edit MACHINES.INI!
goto END
:TOOMANYSUBOOT
echo There are too many SUBOOT subdirectories of the home directory.
echo Please delete the unneeded ones and rename the most current one
echo to %1\suboot.
goto USAGE
:NOSYSTEMDAT
echo The file %1\%SUBOOTDIR%\SYSTEM.DAT could not be found.
echo Check that home directory %1 is correct.
goto USAGE
:NODATA
echo The file %2\RPLFILES\PROFILES\%3\LANMAN.DOS\LANMAN.INI could not be found.
echo Check that server name %2 and profile name %3 are correct.
goto USAGE
:HASCLIENTFILES
echo Client files are already present on %2\rplfiles\profiles\%3.
goto END
:COPYERROR
echo An error occurred copying files.
goto END
:USAGE
echo �
echo Syntax for WIN95CLT:
echo �
echo WIN95CLT [homedir] [rplserver] [profile]
echo �
echo [homedir] = workstation's home directory
echo [rplserver] = remoteboot servername (e.g. \\RPLSERVER)
echo [profile] = name of profile assigned to workstation (e.g. WIN95IP)
echo �
echo Example: WIN95clt g:\homedir1 \\RPLSERVER Win95IP
goto END
:END