@setlocal
@set TEMPD=..\3rdparty
@if NOT EXIST %TEMPD%\. goto ERR1

@set TEMPD1=%TEMPD%\include
@set TEMPD11=%TEMPD1%\plib
@set TEMPD2=%TEMPD1%\lib


@dir /w *.lib
@dir /w *.h
@echo Copy ALL libraries and headers to %TEMPD2% and %TEMPD11% resp.
@echo *** CONTINUE? *** Only Ctlr+c aborts. All other keys continue
@pause

@if NOT EXIST %TEMPD1% (
md %TEMPD1%
@if NOT EXIST %TEMPD1% (
@echo ERROR: Failed to create %TEMPD1%
@goto END
)
)

@if NOT EXIST %TEMPD2% (
md %TEMPD2%
@if NOT EXIST %TEMPD2% (
@echo ERROR: Failed to create %TEMPD2%
@goto END
)
)

@if NOT EXIST %TEMPD11% (
md %TEMPD11%
@if NOT EXIST %TEMPD11% (
@echo ERROR: Failed to create %TEMPD11%
@goto END
)
)

copy *.lib %TEMPD2%\.
copy *.h %TEMPD11%\.
@echo All done...

@goto END

:ERR1
@echo ERROR: Destination [%TEMPD%] does NOT exist!
@goto END

:END
