@if NOT EXIST setup.bat goto ERR1
call setup
call mdd temp
@if NOT EXIST ..\delete01.bat goto ERR2
@set TEMPPROM=%PROMPT%
@set PROMPT=# 
touch file1
@if NOT EXIST file1 goto ERR3
md directory
@if NOT EXIST directory\nul goto ERR4
md directory\subdirectory
@if NOT EXIST directory\subdirectory\nul goto ERR5


touch directory/file1
touch directory/file2
touch directory/subdirectory/file1
touch directory/subdirectory/file2
%TEMPT% -cf archive ./file1 directory
@if NOT EXIST archive goto ERR6

@echo.
@echo Full content list ...
%TEMPT% -tf archive

@echo.
@echo Now, with some content EXCLUDED from output ...
%TEMPT% -tf archive --exclude='./*1' --exclude='d*/*1' --exclude='d*/s*/*2'
@echo Should only see 3 entries ... others are excluded ...
@echo directory/
@echo directory/file2
@echo directory/subdirectory/
@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 'touch' file1 ... maybe touch is not in the path ...
@goto WAIT

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

:ERR5
@echo ERROR: Unable to create subdirectory ...
@goto WAIT

:ERR6
@echo ERROR: Failed to create archive file ...
@goto WAIT

:WAIT
@pause
cd ..
@goto END


:END
@set PROMPT=%TEMPROM%
