Board index » delphi » Copying Files Within Delphi

Copying Files Within Delphi

In article <4pnq20$...@raffles.technet.sg>, Lee Li Yang <ici...@po.pacific.net.sg> wrote:

Quote
>In Delphi Help, there is no documentation for Copying 1 file to another.

>What I need is a function call like :

>                              FileExists(filename) in Delphi

>which will perform something like :

>                              Diskcopy filename1 filename2   in DOS

>Appreciate any kind assistance.

Here's my code that uses the WinAPI...

   FromChar, ToChar: array[0..200] of Char; {<-------- Not PChar!}

                           StrPCopy(ToChar,ToString);
                           StrPCopy(FromChar,FromString);
                           CopyFile(FromChar,ToChar,False);

 

Re:Copying Files Within Delphi


In Delphi Help, there is no documentation for Copying 1 file to another.

What I need is a function call like :

                              FileExists(filename) in Delphi

which will perform something like :

                              Diskcopy filename1 filename2   in DOS

Appreciate any kind assistance.

CAI

Re:Copying Files Within Delphi


Hello

I not realize your problem very much. However, as I know although in
Delphi you  still can use SDK Windows API. So, in WIN32 you can use API
call (I forget the right function name may be named CopyFile), in WIN16
you can use standard libary or use DOS call.

Kang-Li Huang

Quote
> Lee Li Yang <ici...@po.pacific.net.sg> wrote in article

<4pnq20$...@raffles.technet.sg>...
Quote
> In Delphi Help, there is no documentation for Copying 1 file to another.

> What I need is a function call like :

>                               FileExists(filename) in Delphi

> which will perform something like :

>                               Diskcopy filename1 filename2   in DOS

> Appreciate any kind assistance.

> CAI

Other Threads