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

md directory
@if NOT EXIST directory goto ERR3

%TEMPT% -cPvf archive directory/../directory
@echo separator

rd directory
%TEMPT% -xPvf archive
@if NOT EXIST directory goto ERR4
@echo Success ...
@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: can not create directory ...
@goto WAIT

:ERR4
@echo ERROR: can not extract directory ...
@goto WAIT

:WAIT
@pause
cd ..
@goto END


:END
