FTP file To Server

106 Views Asked by At

I am currently using FTPwebRequest to move a local file over to a server. I am able to FTP to the root directory at ftp://ftp.xxxx.com. But, whenever I try to FTP the file to a folder within that directory like: ftp://ftp.xxxx.com/firstfolder nothing happens. I don't get any hard halts in the code and I also setup a FTPwebResponse stating that the transfer is complete.

string dest = "ftp://username:[email protected]/firstfolder/" + fileName;

ftp = (FtpWebRequest)FtpWebRequest.Create(dest);

I have also tried using %2f to mimic the CD command.

Here are a few links I have been looking at with no luck: https://blogs.msdn.microsoft.com/mariya/2006/03/06/changing-to-the-root-directory-with-ftpwebrequest

https://social.msdn.microsoft.com/Forums/en-US/91e2bed0-9e5e-4503-9e66-d224086e43a8/change-directory-with-ftpwebrequest

https://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest(v=vs.110).aspx

1

There are 1 best solutions below

0
On

In IE the file did not appear in the servers directory. I used google chrome and I was able to view the file successfully. It was uploaded the hole time.