var lista = System.IO.Directory.GetFiles(@"C:\Users\Mario\Pictures\MCTS(all)"); var result = (from l in lista where l.Contains(".jpg") select l).ToList();