简体   繁体   English

使用C#.Net将文件从ftp复制到远程桌面

[英]Copy files from ftp to remote desktop using C#.Net

I have to copy some files from ftp to another remote desktop computer. 我必须将某些文件从ftp复制到另一台远程台式计算机。 I am doing this as: 我这样做是:

File.Copy("ftp://IPAddress:Port/MyFolder/MyFile.dll", @"IPAddress\MyLocation");

But this is not working. 但这是行不通的。 I think, it happened because the folder in the remote desktop where i have to paste my file is not a shared folder. 我认为,这是因为我必须粘贴文件的远程桌面中的文件夹不是共享文件夹。

so , i want to know how can we copy files from ftp to remote desktop folder which is not shared? 因此,我想知道如何将文件从ftp复制到不共享的远程桌面文件夹?

also, the ftp and remote desktop requires the credentials (Password). 另外, ftp远程桌面也需要凭据(密码)。 pls also tell me how can i handle credentials in my code? 请告诉我如何处理代码中的凭据?

The System.Io.File class does not support URI's or the FTP protocol, only access to local file system and shared folders. System.Io.File类不支持URI或FTP协议,仅支持访问本地文件系统和共享文件夹。

Please check out this article on how to upload files with FTP using the .NET Framework. 请查看有关如何使用.NET Framework通过FTP上传文件的本文

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM