如何将文件从网络上的计算机复制到C ++中的文件夹 [英] How copy file from amachine on network to my folder in C++

查看:108
本文介绍了如何将文件从网络上的计算机复制到C ++中的文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在整个网络中复制文件时遇到问题,需要您的帮助.

示例:在机器192.168.1.12上(或计算机名称:localtest)上有一个文件夹:测试包含文件:abc.txt和hhh.txt

那么如何将2个文件abc.txt和hhh.txt复制到我的计算机上的文件夹C:\\ Data?

在此先感谢

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

推荐答案

没有只是复制".这完全取决于您在远程计算机上运行的内容.例如,您可以运行FTP服务并向某些用户(经过身份验证或匿名)提供访问权限,然后您的代码应充当FTP客户端;您可以运行Windows文件共享服务,然后可以使用UNC路径名完全像使用本地文件一样复制文件(请参见 ^ ]);您可以在远程计算机上运行HTTP服务,然后您的代码应充当HTTP客户端-依此类推,等等...

—SA
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


这篇关于如何将文件从网络上的计算机复制到C ++中的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆