0

I have to copy some files from ftp to another remote desktop computer. 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?

also, the ftp and remote desktop requires the credentials (Password). pls also tell me how can i handle credentials in my code?

2
  • Have you tried using drive$ for the IPAddress\MyLocation? i.e. C$ will give you access to remote pc's C: drive Commented Jan 5, 2012 at 10:18
  • 1
    Even this question in SO has sample code in it. stackoverflow.com/questions/2781654/ftpwebrequest-download-file Commented Jan 5, 2012 at 10:19

1 Answer 1

1

The System.Io.File class does not support URI's or the FTP protocol, only access to local file system and shared folders.

Please check out this article on how to upload files with FTP using the .NET Framework.

Sign up to request clarification or add additional context in comments.

2 Comments

i have successfully download file from FTP using ftpwebrequest and ftpwebresponse classes. Now, i have to paste this file to the folder of a remote server PC and this folder is not Shared. Is it possible?
This has nothing to do with folder sharing. FTP is a separate protocol that needs a separate server application like for instance Serv-U (Windows) or proftpd (Linux). See en.wikipedia.org/wiki/FTP and en.wikipedia.org/wiki/Comparison_of_FTP_server_software

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.