Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1. static class Tproger
  2.     {
  3.         static string dir = @"C:\Cats\Porno";
  4.  
  5.         static List<string> GetAllFiles(string dir)
  6.         {
  7.             return Directory.GetFiles(dir, "EDI_*", SearchOption.AllDirectories)
  8.                 .Where((x) => new FileInfo(x).Length < 1024 && (x.EndsWith(".eml") || x.EndsWith(".zip"))).ToList();
  9.         }
  10.  
  11.         static public void Main()
  12.         {
  13.             List<string> resultList = GetAllFiles(dir);
  14.             resultList.Sort(String.Compare);
  15.             resultList.ForEach((x) => Console.WriteLine(x));
  16.         }
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement