Board index » delphi » Xcopy type function - How to do?

Xcopy type function - How to do?

I am using Delphi 2.0 under Windows NT 4.0 to copy files in various
subdirectories to the a: drive (which subdirectories are copied is decided
by the User at run time) and I can not figure out how this seamingly simple
task can be achieved using delphi.

I want to be able to do the equivalent of
xcopy c:\data\delphi\subdir1\*.* a:\ /s.

I know that the DOS3Call command is now obsolete and I can not figure out
how to make a host operating system call to do this (or any other file
copy/rename/create function other than using Read/Write Stream commands)

Can anyone assist me?

Thanks

Lex.

 

Re:Xcopy type function - How to do?


Use Findnext, findfirst, CHDIR, MKDIR, blockread and blockwrite. It's
probably the best way to write the routine yourself.

Delivery Services <dels...@national.com.au> schreef in artikel
<01bc7084$8da00600$deb90ccb@r3ecc989>...

Quote
> I am using Delphi 2.0 under Windows NT 4.0 to copy files in various
> subdirectories to the a: drive (which subdirectories are copied is
decided
> by the User at run time) and I can not figure out how this seamingly
simple
> task can be achieved using delphi.

> I want to be able to do the equivalent of
> xcopy c:\data\delphi\subdir1\*.* a:\ /s.

> I know that the DOS3Call command is now obsolete and I can not figure out
> how to make a host operating system call to do this (or any other file
> copy/rename/create function other than using Read/Write Stream commands)

> Can anyone assist me?

> Thanks

> Lex.

Re:Xcopy type function - How to do?


Look on the web for Copy component ( I think it is on the superpage)
--
+++

Use this address to Mail, no Spam_Mail.
Sanne Hoekstra
Sant...@dds.dds.nl

Delivery Services <dels...@national.com.au> schreef in artikel
<01bc7084$8da00600$deb90ccb@r3ecc989>...

Quote
> I am using Delphi 2.0 under Windows NT 4.0 to copy files in various
> subdirectories to the a: drive (which subdirectories are copied is
decided
> by the User at run time) and I can not figure out how this seamingly
simple
> task can be achieved using delphi.

> I want to be able to do the equivalent of
> xcopy c:\data\delphi\subdir1\*.* a:\ /s.

> I know that the DOS3Call command is now obsolete and I can not figure out
> how to make a host operating system call to do this (or any other file
> copy/rename/create function other than using Read/Write Stream commands)

> Can anyone assist me?

> Thanks

> Lex.

Re:Xcopy type function - How to do?


Quote
Sanne Hoekstra wrote:

> Look on the web for Copy component ( I think it is on the superpage)
> --
> +++

> Use this address to Mail, no Spam_Mail.
> Sanne Hoekstra
> Sant...@dds.dds.nl

> Delivery Services <dels...@national.com.au> schreef in artikel
> <01bc7084$8da00600$deb90ccb@r3ecc989>...
> > I am using Delphi 2.0 under Windows NT 4.0 to copy files in various
> > subdirectories to the a: drive (which subdirectories are copied is
> decided
> > by the User at run time) and I can not figure out how this seamingly
> simple
> > task can be achieved using delphi.

> > I want to be able to do the equivalent of
> > xcopy c:\data\delphi\subdir1\*.* a:\ /s.

> > I know that the DOS3Call command is now obsolete and I can not figure out
> > how to make a host operating system call to do this (or any other file
> > copy/rename/create function other than using Read/Write Stream commands)

> > Can anyone assist me?

> > Thanks

> > Lex.

Take a look at 'BlockRead' function in delphi help.
I've used this and works fine as well with long filenames.

Werner

Other Threads