string[] files =
Directory.GetFiles
(@"c:\myfolder\", "*_temp.txt", SearchOption.TopDirectoryOnly);
or using linq
var files = from f in Directory.GetFiles((@"c:\MyData\SomeStuff")
where f.Contains("_temp")
select f;
Once you get all the files, you need to iterate the results and delete them one at a time. However, this can be expensive for an asp.net site. You also need to make sure that concurrent requests do not throw an exception!
, , , non temp. .