Board index » delphi » How do I copy files in Delphi 1

How do I copy files in Delphi 1

I have a DOS batch file that does a

copy a:arc.* c:\workarea

How can I do this from within a Delphi 1 app?

Thanks

 

Re:How do I copy files in Delphi 1


In article <01bd3bf9$3c207ee0$4cf041ce@jcs>

Quote
"SSS" <j...@s-3.com> wrote:
> I have a DOS batch file that does a

> copy a:arc.* c:\workarea

> How can I do this from within a Delphi 1 app?

Check BlockRead() and BlockWrite(), and/or the LZEXPAND functions
(e.g., LZCopy, CopyLZFile, etc). These are well documented in the help
files.

Best regards, The Chief
--------
Dr. A{*word*73}la A. Olowofoyeku (The African Chief)
Email: la...@keele.ac.uk
Homepage: http://ourworld.compuserve.com/homepages/African_Chief/
Author of: Chief's Installer Pro 4.12 for Win16 and Win32:
ftp://ftp.simtel.net/pub/simtelnet/win3/install/chief412.zip            

Re:How do I copy files in Delphi 1


A simple solution is:

var
  aStream: TMemoryStream;
begin
aStream:= TMemoryStream.Create;
aStream.LoadFromFile(<srcfilename>);
aStream.SaveToFile(<destfilename>);
aStream.Free;
end;

I don't know if it works for every size of files, but it's short.

regards guenther

Re:How do I copy files in Delphi 1


For easy copying help, check your own hard disk reservois first.
Start from directory C:\DELPHI\DEMOS\DOC\FILMANEX

Markku Nevalainen

Quote
SSS wrote:

> I have a DOS batch file that does a

> copy a:arc.* c:\workarea

> How can I do this from within a Delphi 1 app?

> Thanks

Other Threads