标签:directory style procedure extra href save tar log .com
procedure TForm1.btn1Click(Sender: TObject); var astr: string; sList: TStrings; path: string; begin sList := TStringList.Create; path := ‘C:\a\b.txt‘; try if not DirectoryExists(ExtractFilePath(path)) then begin ForceDirectories(ExtractFilePath(path)); end; if FileExists(path) then begin sList.LoadFromFile(path); end; sList.Add(FormatDateTime(‘YYYY-MM-dd‘, now) +‘:‘+ #13#10 + mmo1.Text); sList.SaveToFile(path); finally sList.Free; end; end;
转自:http://blog.sina.com.cn/s/blog_4bc47d230101eief.html
标签:directory style procedure extra href save tar log .com
原文地址:http://www.cnblogs.com/chuangyiyuan/p/6217380.html