var
F: Text; //TextFile 和 Text 是一样的
----------------------------------
filename := ExtractFilePath(Application.ExeName) + '院感病历导入记录.txt';
if FileExists(filename) then
begin
AssignFile(F,FileName);
Append(F); //打开准备追加
Writeln(F, datetostr(curdate) + '成功导入!');
CloseFile(F);
end
else
begin
FileCreate(filename);
AssignFile(F,FileName);
Append(F); //打开准备追加
Writeln(F, datetostr(curdate) + '成功导入!');
CloseFile(F);
end;
本文转自鹅倌51CTO博客,原文链接:http://blog.51cto.com/kaixinbuliao/1754260 ,如需转载请自行联系原作者