procedure TFrmAutomatismBalance.FlatButton3Click(Sender: TObject);
var
TF:TextFile;
PathStr:string;
begin
PathStr:=ExtractFilePath(Application.ExeName)+FormatDateTime(‘yyyy-mm-dd‘,Now())+‘.txt‘ ;
AssignFile(Tf,PathStr);
ReWrite(Tf);
CloseFile(Tf);
end;
//往文本文件里面写入数据
procedure TFrmAutomatismBalance.FlatButton3Click(Sender: TObject);
var
TF:TextFile;
PathStr:string;
begin
PathStr:=ExtractFilePath(Application.ExeName) +FormatDateTime(‘yyyy-mm-dd‘,Now())+‘.txt‘ ;
AssignFile(Tf,PathStr);
Append(Tf);
WriteLn(Tf,‘Creat A TXT‘);
Flush(Tf);
CloseFile(Tf);