What is an easy way to create a directory on an FTP server using C #?
I figured out how to upload a file to an existing folder, for example:
using (WebClient webClient = new WebClient()) { string filePath = "d:/users/abrien/file.txt"; webClient.UploadFile("ftp://10.128.101.78/users/file.txt", filePath); }
However, if I want to upload to users/abrien , I get a WebException saying that the file is not available. I suppose this is because before I upload my file I need to create a new folder, but WebClient does not seem to have methods for this.
Anthony Brien May 13, '09 at 21:57 2009-05-13 21:57
source share