posted 8/2/2011 by Raghav Khunger
Today I was working with a code where I needed to check whether a physical directory exists or not and if not, then I had to create it. I decided to write a quick blog on this. Below is sample code to do the same:
string path = "D:\\test"; string basePath = Server.MapPath(path); if (!System.IO.Directory.Exists(basePath)) { System.IO.Directory.CreateDirectory(basePath); }
What kind of email newsletter would you prefer to receive from CodeAsp.Net?18