string path = @"D:\downloads\13241234";
string pattern = "[domain]";
string replacement = "www.google.com";
var files = System.IO.Directory.EnumerateFiles(path, "*.*", System.IO.SearchOption.AllDirectories).Where(s => s.EndsWith(".txt") || s.EndsWith(".php")|| s.EndsWith(".html"));
foreach(var filepath in files){
string text = System.IO.File.ReadAllText(filepath);
text = text.Replace(pattern, replacement);
System.IO.File.WriteAllText(filepath, text);
}