List data = new List();
foreach (var file in Dictionary.GetFiles("e:\华新采集", "*.txt"))
{
data.AddRange(File.ReadAllLines(file).Skip(2));
}
var query = data.Select(x => x.Split('\t')).GroupBy(x => x[1]).OrderBy(x => x.Key).Select((x, i) => string.Format("{0}\t{1}\t{2}", i + 1, x.Key, x.Sum(y => int.Parse(y[2]))));
File.WriteAllLines("aaa.txt", query);
这个程序现在不同文件名字相同也合并了,这个不要合并,怎么修改?