you can use the WebClient/FTPWebRequest/FTPWebResponse classes to get directory listing....
this is new in .NET 2.0
http://msdn2.microsoft.com/en-us/library/system.net.ftpwebrequest.aspx
http://msdn2.microsoft.com/en-us/library/system.net.ftpwebresponse.aspx
a quick small example to get directory listing:
NetworkCredential theCredentials = new NetworkCredential("username", "password");
FtpWebRequest theRequest = (FtpWebRequest)WebRequest.Create("ftp://blah.com");
theRequest.Credentials = theCredentials;
theRequest.Method = WebRequestMethods.Ftp.ListDirectory;
FtpWebResponse theResponse = (FtpWebResponse)theRequest.GetResponse();
StreamReader theReader = new StreamReader(theResponse.GetResponseStream())
string[] theFilesListing = theReader.ReadToEnd().Split(new string[] {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries);
this will hook up to the ftp site, get the listing of the directory and store each entry in a string[] array which you can loop through and check what you want
does this help/give you some guidence Be sure to import the System.IO and System.Net namespace
|