@echo Tidy ALL batch ...
@if NOT EXIST samples\. goto ERR1
@if NOT EXIST samples\temp\. goto ERR2

cd samples
@for %%i in (*.htm) do @(call :CHKIT %%i)
cd ..
@goto :EOF

:CHKIT
@if "%1x" == "x" goto :EOF
@if NOT EXIST %1 goto NOFILE
call ti2 %1 temp\%1
@goto :EOF

:NOFILE
@echo Can NOT locate %1 ... check name, location ...
@pause
@goto :EOF


:ERR1
@echo ERROR: Can NOT locate folder samples ... check name, location ...
@goto END
:ERR2
@echo ERROR: Can NOT locate folder samples/temp ... check name, location ...
@goto END


:END
