.KEY directory/A,tofile/A
.BRA {
.KET }

;
; Calculate size of directory
; ( DU is included in MB:C )
;

If `MB:C/Du -S "{directory}"` GT 2000 VAL
	; sorry, too large
	Delete "{tofile}"
Else
	; okay, let's pack it
	LhA -a -A -b64 -e -P-1 -r -x a "{tofile}" "{directory}"
	;Rename "{tofile}.lha" "{tofile}"
EndIf

