how to fetch a range of files from an FTP server using C#

Posted by user260076 on Stack Overflow See other posts from Stack Overflow or by user260076
Published on 2010-04-11T07:37:34Z Indexed on 2010/04/11 7:43 UTC
Read the original article Hit count: 242

Filed under:
|
|

hello all,

i'm stuck at a point where i am using a wildcard parameter with the FtpWebRequest object as suck

   FtpWebRequest reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri("ftp://" + ftpServerIP + "/" + WildCard));

now this works fine, however i now want to fetch a specific range of files.

say the file naming structure is *YYYYMMDD.* and i need to fetch all the files prior to today's date.

i've been searching for a wildcard pattern for that with no good results, one that will work in a simple file listing.

and it doesn't look like i can use regex here.

any thoughts ?

© Stack Overflow or respective owner

Related posts about c#

Related posts about ftp