I am looking to download all the files in ftp to my local folder.All the files should be deleted in ftp once downloaded to local drive.
From the below code
I can download only a file from ftp where I am not expecting
I need to place all the files in a folder but not in the name of local file name.
My code:
using (WebClient ftpClient = new WebClient())
{
ftpClient.Credentials = new System.Net.NetworkCredential("ftpusername", "ftp pass");
ftpClient.DownloadFile("ftp://ftpdetails.com/dec.docx",@"D:\\Mainfolder\test.docx");
}
From the above code, i can download a file and place it in the name of file only..Where I have so many files to download from ftp and place it in a local folder..Any suggestions very much thankful.