procedure TForm1.Button2Click(Sender: TObject);
var
f: TextFile;
begin
AssignFile(f, 'C:/1.txt');
Append(f);
Writeln(f,'');
Writeln(f, 'I am appending some stuff to the end of the file.');
Flush(f)
{ ensures that the text was actually written to file }
CloseFile(f);
end;