solution
var path = Server.MapPath("~/temp");
System.IO.DirectoryInfo di =
new System.IO.DirectoryInfo(path.ToString());
System.IO.FileInfo[] rgFiles =
di.GetFiles("*.xml");
foreach (System.IO.FileInfo fi in
rgFiles)
{
fi.Delete();
// Delete the files here
}
No comments:
Post a Comment