p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

c_plus_plus_programming thread: copying file from LAN to local


Message #1 by "Andreas Gerth" <gerth.a@g...> on Sun, 17 Feb 2002 13:52:20
Hi everybody,



I want to write a c++ programm, that copies some files from LAN to local 

disk. I tried CopyFile(), but it only works local and not on LAN. If 

anyone knows how to do this please help me. Maybe I am just to stupid to 

enter the path in the right form for CopyFile, but I don't have any more 

ideas to try. Permissions don't make any trouble, I tried copying in the 

DOS-Box and it worked immediately.



Thanks for your help,

Andreas Gerth
Message #2 by "Hrishikesh Lele" <hrishi_lele@y...> on Mon, 18 Feb 2002 23:25:56 +0530
hi,



Try using SHFileOperation API . See MSDN for more info.



SHFileOperation

Copies, moves, renames, or deletes a file system object.



int SHFileOperation(

    LPSHFILEOPSTRUCT lpFileOp

);









-hrishi





________________________________________________

Hrishikesh Lele

hrishi@l...

http://www.lelesoft.com

Home : +xx xx xxxxxxx Mobile : +xx xx xxxxxxxxxx

________________________________________________





----- Original Message -----

From: "Andreas Gerth" <gerth.a@g...>

To: "C++_Programming" <c_plus_plus_programming@p...>

Sent: Sunday, February 17, 2002 1:52 PM

Subject: [c_plus_plus_programming] copying file from LAN to local





> Hi everybody,

>

> I want to write a c++ programm, that copies some files from LAN to local

> disk. I tried CopyFile(), but it only works local and not on LAN. If

> anyone knows how to do this please help me. Maybe I am just to stupid to

> enter the path in the right form for CopyFile, but I don't have any more

> ideas to try. Permissions don't make any trouble, I tried copying in the

> DOS-Box and it worked immediately.

>

> Thanks for your help,

> Andreas Gerth




$subst('Email.Unsub').







_________________________________________________________



Do You Yahoo!?



Get your free @yahoo.com address at http://mail.yahoo.com







Message #3 by "Andreas Gerth" <gerth.a@g...> on Mon, 18 Feb 2002 21:48:24
> hi,

> 

> Try using SHFileOperation API . See MSDN for more info.

> 

> SHFileOperation

> Copies, moves, renames, or deletes a file system object.

> 

> int SHFileOperation(

>     LPSHFILEOPSTRUCT lpFileOp

> );

> 

> 

> 

> 

> -hrishi

> 

> 

> ________________________________________________

> Hrishikesh Lele

> hrishi@l...

> http://www.lelesoft.com

> Home : +xx xx xxxxxxx Mobile : +xx xx xxxxxxxxxx

> ________________________________________________

> 

> 

> ----- Original Message -----

> From: "Andreas Gerth" <gerth.a@g...>

> To: "C++_Programming" <c_plus_plus_programming@p...>

> Sent: Sunday, February 17, 2002 1:52 PM

> Subject: [c_plus_plus_programming] copying file from LAN to local

> 

> 

> > Hi everybody,

> >

> > I want to write a c++ programm, that copies some files from LAN to 

local

> > disk. I tried CopyFile(), but it only works local and not on LAN. If

> > anyone knows how to do this please help me. Maybe I am just to stupid 

to

> > enter the path in the right form for CopyFile, but I don't have any 

more

> > ideas to try. Permissions don't make any trouble, I tried copying in 

the

> > DOS-Box and it worked immediately.

> >

> > Thanks for your help,

> > Andreas Gerth




> $subst('Email.Unsub').

> 

> 

> 

> _________________________________________________________

> 

> Do You Yahoo!?

> 

> Get your free @yahoo.com address at http://mail.yahoo.com

> 

> 

> 

Message #4 by "Andreas Gerth" <gerth.a@g...> on Mon, 18 Feb 2002 21:56:27
Thanks for your help. But I solved the problem with CopyFile by adding 

some back slashes in the path. Sometimes it is really frustrating with 

those little bastards.



Regards,

Andreas



PS: The message above was a mistake. I was too fast with pressing ENTER 

after entering e-mail and password.

  Return to Index