I need to download txt files that are in an FTP, I tried to use the following code apprehended below for this but it does not do what I need.
The first parameter of the DownloadFile method is the URL I have, the second parameter is required but I do not want to set a fixed path and I want it to take the original file name.
I want the download to be done the same when you download a file, such as from that site: link through Google Chrome
Does anyone please know how it can be done?
string url = "http://MeuSite/arquivo.text";
using (WebClient wc = new WebClient())
{
wc.DownloadFile(url, "Não sei o que colocar aqui");
}
Thank you all.