Delphi/CB
•  Greatis •  Security •  AppDatabase •  Utilities •  Visual Basic • .NET •  just4fun
Delphi / C++ Builder
Components, utilities and tips for Delphi and C++ Builder developers
Hot Offer
Save your money!
Featured
Ultimate Pack  hot!
Image Editor  new!
Runtime Fusion
Form Designer
Object Inspector
Print Suite Pro
Commented Image
Delphi Toys
WinDowse
Delphi Bonus
TMS Scripter Studio
Form Designer VB
Form Designer .NET

...get more...
for Delphi.NET, C#, VB.NET
for Delphi VCL, BCB 3-6

News Tips .NET Software VCL Software Partners  

Append one file to other
You may copy contents of a first file to [new.$] file. After that, you may add contents of a second file to [new.$] and then delete first file and rename [new.$] file to name of the first file.

procedure TForm1.Button3Click(Sender: TObject);
var
  Str: string;
  F1, F2, F3: TextFile;
begin
  Label3.Caption:='Processing...';
  AssignFile(F1, Edit1.Text);
  AssignFile(F2, Edit2.Text);
  AssignFile(F3, 'new.$');
  Reset(F1);
  Reset(F2);
  Rewrite(F3);
  while not(EOF(F1)) do
  begin
    Readln(F1, Str);
    Writeln(F3, Str);
  end;
  while not(EOF(F2)) do
  begin
    Readln(F2, Str);
    Writeln(F3, Str);
  end;
  CloseFile(F1);
  CloseFile(F2);
  CloseFile(F3);
  DeleteFile(ExtractFileName(Edit1.Text));
  RenameFile('new.$', ExtractFileName(Edit1.Text));
  DeleteFile('new.$');
  Label3.Caption:='Processing done';
end;

For more
Delphi Help

Download source


Our Partner
DevArchive.com
Recommended
just4fun
Useful Resources
Win32.hlp Online
Unix Manual Pages
MegaDetailed.NET
in3steps.com

Blogspot  greatis.blogspot.com

Newsletters
Subscribe to our news!    Subscribe to our news!


Greatis Software Greatis | Security | AppDatabase | Utilities | Delphi/CB | Visual Basic | .NET | just4fun

Contacts | Add to Favorites | Recommend to a Friend | Privacy Policy | Copyright © 1998-2008 Greatis Software