Board index » delphi » copy a file

copy a file


2005-08-03 08:47:42 PM
delphi27
Hello,
is there anyway to copy a file from server to local machine with a password?
I mean the shared directory is password protected. Can I copy the file
without opening all the folder ie using net use ? Just to copy the file with
the password.
Thanks
 
 

Re:copy a file

Hello,
I would like to copy a file and copy it back in the same directory with a different name.
I was looking at ShellExecuteEx or ShellExecute to do this but I can not find any good documentation on what I need to do. Or is there another better way?
 

Re:copy a file

Ohh I should mention that it also needs to be able to copy over a file that the same name as well.
 

Re:copy a file

about using the CopyFile from VCL?
HTH Pete
"edward" <XXXX@XXXXX.COM>writes
Quote

Hello,

I would like to copy a file and copy it back in the same
directory with a different name.

I was looking at ShellExecuteEx or ShellExecute to do this
but I can not find any good documentation on what I need to
do. Or is there another better way?

 

Re:copy a file

Pete Fraser writes:
Quote
about using the CopyFile from VCL?

CopyFile and CopyFileEx are part of the Windows API.
Danzer
 

Re:copy a file

"edward" <XXXX@XXXXX.COM>writes
Quote
I would like to copy a file and copy it back in the same directory
with a different name.
CopyFile()
Quote
I was looking at ShellExecuteEx or ShellExecute to do this
That is overkill.
Gambit
 

Re:copy a file

Hmm thanks guys. Apparently that function is not in the help files.
"Remy Lebeau \(TeamB\)" <XXXX@XXXXX.COM>writes:
Quote

"edward" <XXXX@XXXXX.COM>writes
news:45b62ffb$XXXX@XXXXX.COM...

>I would like to copy a file and copy it back in the same directory
>with a different name.

CopyFile()

>I was looking at ShellExecuteEx or ShellExecute to do this

That is overkill.


Gambit


 

Re:copy a file

edward writes:
Quote
Hmm thanks guys. Apparently that function is not in the help files.
Yes it is. it is a function from the Win32 API. Type this URL in the
Borland Help:
ms-help://borland.bds4/fileio/base/copyfile.htm
Michel
--
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
www.leunen.com/
----------------------------------------
 

Re:copy a file

"Michel Leunen" <XXXX@XXXXX.COM>writes
Quote
Type this URL in the Borland Help:
That URL only applies to BDS. For older versions of BCB, look for the
win32.hlp file instead.
Gambit