procedure AppendFile(var GdInput : boolean; OutPath : string; WhatFile : string; var OutFile : Data); begin gdinput := true; if Exist(Outpath+Whatfile) then begin assign (outfile,outpath+whatfile); append(OutFile); end {if exist...} else begin assign (Outfile, outpath+whatfile); {$I-} rewrite(OutFile); {$I+} if (ioresult <> 0) then begin Error('Bad filename! Re-enter the complete filename including path.'); GdInput := False; end; end; {else} end;