var files = Directory.GetFiles("/var/data");
int maxCount = 0;
string lagrestFile = "";
foreach(var file in files){
    var lines = File.ReadAllLines(file);
    if(lines.Count() > maxCount){
        maxCount = lines.Count();
        lagrestFile = file;
    }
}
if(File.Exists("/var/result/data.txt"))
    File.Delete("/var/result/data.txt");
File.Move(lagrestFile, "/var/result/data.txt");