@if NOT EXIST setup.bat goto ERR1
call setup
call mdd temp
@if NOT EXIST ..\extrac01.bat goto ERR2

md directory
@if NOT EXIST directory goto ERR3
@touch directory\file
@if NOT EXIST directory\file goto ERR4
%TEMPT% cf archive directory
@if ERRORLEVEL 1 goto ERR5
@if NOT EXIST archive goto ERR5
%TEMPT% xf archive
@if ERRORLEVEL 1 goto ERR6
@echo Appears successful ...
@cd ..
@goto END

:ERR1
@echo Can NOT locate setup.bat ... check name, location ...
@goto END

:ERR2
@echo mdd.bat missing, or failed ... check name, location ...
@goto END

:ERR3
@echo ERROR: Unable to create directory ...
@goto WAIT

:ERR4
@echo ERROR: Unable to create file ... maybe touch utility NOT in path ...
@goto WAIT

:ERR5
@echo ERROR: Unable to create archive ... or tar exitted with error ...
@goto WAIT

:ERR6
@echo ERROR: tar exit NOT zero ... got %ERRORLEVEL% ...
@goto WAIT

:WAIT
@pause
cd ..
@goto END


:END
