将文件从一个文件夹复制到FTP服务器上的另一个文件夹 [英] copy file from one folder to another on FTP server

查看:396
本文介绍了将文件从一个文件夹复制到FTP服务器上的另一个文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨;

我想将文件从FTP服务器文件夹复制到同一ftp服务器上的另一个文件夹.
任何帮助将不胜感激.

Hi;

I want to copy a file from FTP server folder to another folder on the same ftp server.
any help would be appreciated.
thanks.

推荐答案

没有此类FTP操作,因此解决方案是将文件读入内部缓冲区(或使用System.IO.Path.GetTempFileName的临时文件,请参见 http://msdn.microsoft.com/en-us/library/system.io.path. aspx [^ ],然后使用FTP将其复制到另一个目录中的新文件中.

要使用FTP,您将需要使用System.Net.FtpWebRequestSystem.Net.WebRequestMethods.Ftp,请参见:
http://msdn.microsoft.com/en-us/library/system.net. ftpwebrequest.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/system. net.webrequestmethods.ftp.aspx [ ^ ].

—SA
There is no such FTP operation, so the solution is to read the file into internal buffer (or a temporary file using System.IO.Path.GetTempFileName, see http://msdn.microsoft.com/en-us/library/system.io.path.aspx[^] and copy it onto a new file in another directory using FTP.

To work with FTP, you will need to use System.Net.FtpWebRequest and System.Net.WebRequestMethods.Ftp, see:
http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest.aspx[^],
http://msdn.microsoft.com/en-us/library/system.net.webrequestmethods.ftp.aspx[^].

—SA


这篇关于将文件从一个文件夹复制到FTP服务器上的另一个文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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