var
TextFileName : TextFile;
tmpStrList : TStringList;
begin
if not FileExists(ExtractFilePath(Application.Exename) + '文件名') then
begin
AssignFile(TextFileName,ExtractFilePath(Application.Exename) + + '文件名');
Rewrite(TextFileName);
CloseFile(TextFileName);
end;
tmpStrList := TStringList.Create;
try
if trim(字符串) <> '' then tmpStrList.Add(字符串)
else Exit;
tmpStrList.SavetoFile(ExtractFilePath(Application.Exename) + '文件名');
finally
tmpStrList.Free;
end;
end;