@if "%TEMPCHK%x" == "x" goto ERR1
@if NOT EXIST %TEMPCHK% goto ERR2

@for /F "tokens=1" %%i in (%TEMPCHK%) do @(call :DOCLEAN2 %%i)
@goto END

:DOCLEAN2
@if "%1x" == "x" goto :EOF
@if NOT EXIST %1\. goto :NOCLEAN2
@REM echo Processing %1 sub-directory...
@if "%TEMP3%x" == "nox" goto DOCLEAN1
%TEMP3% %1 -dfrm
@goto :EOF
:DOCLEAN1
@cd %1
@echo Process %CD% sub...
@REM DO CLEANING HERE
@REM call %TEMP2%
@cd ..
@goto :EOF

:NOCLEAN2
@REM echo No locate of [%1] sub-directory in [%CD%]...
@goto :EOF

:ERR1
@echo ERROR: TEMPCHK NOT set in environment...
@goto END

:ERR1
@echo ERROR: File %TEMPCHK% NOT found...
@goto END


:END
