Instantly share code, notes, and snippets.

Embed
What would you like to do?
Merge CSV Files
File.WriteAllLines(@"e:\resumo.txt", Directory.EnumerateFiles(@"E:\dados", "*.txt", SearchOption.AllDirectories)
.SelectMany(File.ReadLines)
.Select(s => s.Trim())
.Where(s => !string.IsNullOrWhiteSpace(s))
.Distinct()
.OrderBy(x => x));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment