Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I have a problem about copy file throughout network that need your help.

EXample: on machine 192.168.1.12 (or computer name: localtest)has a folder: Test consist file: abc.txt and hhh.txt

So how to copy 2 files: abc.txt and hhh.txt to my machine on folder: C:\\Data?

Thanks in advance
Posted

1 solution

There is not "just copy". It totally depends on what you are running on remote machine. For example, you can run FTP service and provide access to some users (authenticated or anonymous), and then your code should act as an FTP client; you can run Windows file sharing service, and then you can copy file exactly as you would do it with local files, using UNC path names (see http://en.wikipedia.org/wiki/UNC_path#Uniform_Naming_Convention[^]); you can run HTTP service on the remote machine, then your code should act as an HTTP client — so on, so forth…

—SA
 
Share this answer
 
v2
Comments
ngthtra 27-Jun-12 3:05am    
thank I resolved it: CopyFileW(fileDirPath + fileName, sDesFilePath, TRUE)
Sergey Alexandrovich Kryukov 29-Jun-12 19:07pm    
Good.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900