I have an application which needs to find and then process files which follow a very specific naming convention as follows.
IABC_12345-0_YYYYMMDD_YYYYMMDD_HHMMSS.zip
I cant see any easy way of doing this using a search pattern so Im assuming Ill have to do something like this after I have generated a list of files using a simpler wildcard pattern.
RegEx re = new RegEx("blah");
foreach(FileInfo fi in Directory.GetFiles(path, "I*.zip"))
{
if(re.IsMatch(fi.Name))
//blah blah blah
}
Is this the best way of doing this, and if so, how would I form a regular expression to match this file format?