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:password@ftp.xxxx.com/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://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest(v=vs.110).aspx