YNT: copy file routine?

"Metin Murat Elbeyli ( Serel Manisa )" <[email protected]> Tue, 19 Aug 2003 08:16:59 +0300
Newsgroups gmane.comp.lang.delphi.programming
Message-ID <[email protected]>
Brigitte,
=20
There are several examples on http://www.TORRY.net <http://www.torry.net/> =
 about copying/moving files.
=20
Here is the one:
http://www.swissdelphicenter.ch/torry/showcode.php?id=3D28
=20
=20
=20



{BEGIN CODE}

uses=20
  ShellApi;=20

procedure ShellFileOperation(fromFile: string; toFile: string; Flags: Integ=
er);=20
var=20
  shellinfo: TSHFileOpStructA;=20
begin=20
  with shellinfo do=20
  begin=20
    wnd   :=3D Application.Handle;=20
    wFunc :=3D Flags;=20
    pFrom :=3D PChar(fromFile);=20
    pTo   :=3D PChar(toFile);=20
  end;=20
  SHFileOperation(shellinfo);=20
end;=20


// Example, Beispiel:=20

procedure TForm1.Button1Click(Sender: TObject);=20
begin=20
  ShellFileOperation('c:\afile.txt', 'd:\afile2.txt', FO_COPY);=20
  // To Move a file: FO_MOVE=20
end;
=20
{END OF CODE}
=20
=20
=20
=20
=20
=20
-----=D6zg=FCn =DDleti-----
Kimden: Brigitte Spatz [mailto:[email protected]]=20
Tarih: 18 A=F0ustos 2003 Pazartesi 17:59
Kime: [email protected]
Konu: [Delphi] copy file routine?
=20
I can't believe that there should be no routine that copies a file from
one folder to another. I've searched the whole Help but there's nothing
remotely like this. So what's the best/quickest way to programmatically
copy a file from one directory to another?
=20
TIA.
=20
Brigitte
=20
=20
[Non-text portions of this message have been removed]
=20
=20
=20
Delphi VCL Top Sites!
http://www.sandbrooksoftware.com/TS/TS2/Components.shtml
---------------------------------------------------------------
Unsubscribe:[email protected]
List owner:[email protected]
---------------------------------------------------------------=20
=20
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/=20
=20
=20


[Non-text portions of this message have been removed]


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. h=
ttp://www.c1tracking.com/l.asp?cid=3D5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/i7folB/TM
---------------------------------------------------------------------~->

Delphi VCL Top Sites!
http://www.sandbrooksoftware.com/TS/TS2/Components.shtml
---------------------------------------------------------------
Unsubscribe:[email protected]
List owner:[email protected]
---------------------------------------------------------------=20

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/=20