@echo OFF
if "%1"=="" goto USAGE
if "%2"=="" goto USAGE
if "%3"=="" goto USAGE
set SUBOOTDIR=
if exist %1\suboot\[Link] set SUBOOTDIR=suboot
if exist %1\suboot.000\[Link] set SUBOOTDIR=suboot.000
if exist %1\suboot.001\[Link] set SUBOOTDIR=suboot.001
if exist %1\suboot.002\[Link] set SUBOOTDIR=suboot.002
if exist %1\suboot.003\[Link] set SUBOOTDIR=suboot.003
if exist %1\suboot.004\[Link] set SUBOOTDIR=suboot.004
if exist %1\suboot.005\[Link] set SUBOOTDIR=suboot.005
if exist %1\suboot.006\[Link] set SUBOOTDIR=suboot.006
if exist %1\suboot.007\[Link] set SUBOOTDIR=suboot.007
if exist %1\suboot.008\[Link] set SUBOOTDIR=suboot.008
if exist %1\suboot.009\[Link] goto TOOMANYSUBOOT
if "%SUBOOTDIR%"=="" goto NOSYSTEMDAT
if not exist %2\rplfiles\profiles\%3\[Link]\[Link] goto NODATA
if exist %2\rplfiles\profiles\%3\suboot\[Link] goto HASCLIENTFILES
:DOCOPY
echo Updating client files on %2\rplfiles\profiles\%3 ...
if exist %2\rplfiles\profiles\%3\[Link] del %2\rplfiles\profiles\%3\
[Link]
if exist %2\rplfiles\profiles\%3\[Link] del %2\rplfiles\profiles\%3\
[Link]
mkdir %2\rplfiles\profiles\%3\suboot
if not errorlevel 0 goto COPYERROR
for %%i in (
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
) 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\[Link]
if not errorlevel 0 goto COPYERROR
echo NOTE: Don't forget to edit [Link]!
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%\[Link] could not be found.
echo Check that home directory %1 is correct.
goto USAGE
:NODATA
echo The file %2\RPLFILES\PROFILES\%3\[Link]\[Link] 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