foreach (var file in Directory.GetFiles(MainFolder, "*.txt", SearchOption.AllDirectories))
{
var text = File.ReadAllText(file);
//do processing
File.WriteAllText(file, text);
}
0
solved how to open all text files from a directory [closed]