directoryexistshttpcontextcurrentservermappathpath
|
|
|
Friday, 27 January 2012 10:43 |
// Delete all the files in directory in asp.net
private void DeleteDirectoryFiles(string path)
{
if (Directory.Exists(HttpContext.Current.Server.MapPath(path)))
{
string[] files= System.IO.Directory.GetFiles(HttpContext.Current.Server.MapPath(path));
foreach (string file in files)
{
File.Delete(file);
}
}
}
 Read more: |
|
|
|
|