using System;
using System.Linq;
using System.IO;
class Program
{
static void Main(string[] args)
{
try
{
var files = from file in
Directory.EnumerateFiles("c:\\", "*.txt")
where file.ToLower().Contains("europe")
select file;
foreach (var file in files)
{
Console.WriteLine("{0}", file);
}
Console.WriteLine("{0} files found.", files.Count().ToString());
}
catch (UnauthorizedAccessException UAEx)
{
Console.WriteLine(UAEx.Message);
}
catch (PathTooLongException PathEx)
{
Console.WriteLine(PathEx.Message);
}
}
}