I searched and searched and cannot find a way to do this. I have files in the directory that I want to download. File names change constantly, so I canβt upload by file name. Here is what I have tried.
using (WebClient client = new WebClient()) { client.Credentials = new NetworkCredential("User", "Password"); foreach (var filePath in files) client.UploadFile("ftp://site.net//PICS_CAM1//", "STOR", @"PICS_CAM1\"); }
But I get a compiler error:
The name "files" does not exist in the current context
Everything I researched says this should work.
Does anyone have a good way to upload a file directory via WebClient ?
Brad Jarrett May 16 '17 at 22:30 2017-05-16 22:30
source share