@echo Copy boost list of files...
@set TEMPSRC=C:\FGCVS\boost-trunk
@set TEMPIN=boostlist.txt

@if NOT EXIST %TEMPSRC%\boost\. goto ERR1
@if NOT EXIST %TEMPIN% goto ERR2
@set TEMPRET=%CD%

@if NOT EXIST boost\. md boost
@if NOT EXIST boost\. goto ERR3

@for /F "tokens=1" %%i in (%TEMPIN%) do @(call :CHKIT %%i)
@goto DONE

:CHKIT
@if "x%1" == "x" goto :EOF
@REM echo %1
@set TEMPFIL=%~nx1
@set TEMPPATH=%~dp1
@if "%TEMPFIL%x" == "x" goto ISFOLDER
@REM echo %TEMPFIL% (%TEMPPATH%) [%1]
@if NOT EXIST %TEMPSRC%\%1 goto MISSED
@if NOT EXIST %TEMPPATH%\. md %TEMPPATH%
@if NOT EXIST %TEMPATH%\. goto ERR5
@cd %TEMPPATH%
copy %TEMPSRC%\%1 > nul
@cd %TEMPRET%
@goto :EOF

:ISFOLDER
@REM echo FOLDER %1 (%TEMPPATH%)
@REM goto :EOF
@if NOT EXIST %1\. md %1
@if NOT EXIST %1\. goto ERR4
@REM cd %1
@REM cd %TEMPRET%
@goto :EOF

:MISSED
@echo Can NOT locate %TEMPSRC%\%1 ...
@goto :EOF

:ERR1
@echo ERROR: Can NOT locate folder %TEMPSRC%\boost\.!
@goto CHECK
:ERR2
@echo ERROR: Can NOT locate file %TEMPIN%!
@goto CHECK
:ERR3
@echo ERROR: Unable to create directory boost...
@goto END
:ERR4
@echo ERROR: Unable to create directory %1...
@goto END
:ERR5
@echo ERROR: Unable to create directory %TEMPPATH%...
@goto END

:CHECK
@echo Check name, location, and FIX this batch file %0 ...
@goto END

:DONE
@echo done...
:END
