System.IO.File.Delete
filename= AppDomain.CurrentDomain.BaseDirectory + "/images/Photos/" + file; if (File.Exists(filename)) File.Delete(filename);
System.IO.File.Delete(filepath);
DirectoryInfo di = new DirectoryInfo("c:/inetpub/root/Images"); FileInfo[] rgFiles = di.GetFiles("*.aspx"); foreach(FileInfo fi in rgFiles) { File.Delete(fi);// Delete the files here }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)