public int getFTPData() { WebClient request = new WebClient(); string url = "ftp://URL" + "CustStat.csv"; request.Credentials = new NetworkCredential("username", "password"); int result = -1; try { //I do not know what to put here in order to read the files. //This is the condition I want: If data in CSV exist then result = 0 if not result=1 } catch (WebException e) { System.Windows.Forms.MessageBox.Show("Error getFTPData: " + e.ToString()); } return result; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)