Sorry for the late solution but I've been quite busy today with my own stuff.
You can try:
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
IEnumerable<string> allFiles = Directory.EnumerateFiles(targetDirectory, "*.txt", SearchOptions.AllDirectories);
Regex r = new Regex(@".+\\[\d]+\\[\d]+\\[\d]+\\[\d]+\\[^\\]+\.txt", RegexOptions.Compiled | RegexOptions.IgnoreCase);
string[] files = allFiles.Where(f => r.IsMatch(f)).ToArray();
The regex is a quick-built, but I used
Expresso[
^] to test it and it seems correct.
Hope this helps. Kindly.
[Edit]: Corrected a mistake where I used the Match method instead of the proper IsMatch method.
[Edit 2]:
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
class YourClass
{
private static readonly Regex regex = new Regex(@".+\\[\d]+\\[\d]+\\[\d]+\\[\d]+\\[^\\]+\.txt", RegexOptions.Compiled | RegexOptions.IgnoreCase);
string[] files = Directory.EnumerateFiles(targetDirectory, "*.txt", SearchOptions.AllDirectories).Where(f => regex.IsMatch(f)).ToArray();
}