In a C# 2008 desktop application, I want to be able to check for a directory folder existing in a specified location. The directory path will look like C:\\main_folder\mm_yyyy. The mm_yyyy stands for the month and year.
Thus can you should be code on how to check if a folder actually exists?
C# see if directory file exists
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Jan 23, 2013, 5:41 AM EST
Hemant SrivastavaRank #581 · 4.2K reputationPosted Jan 23, 2013, 5:18 AM EST
if (!Directory.Exists(@"C:\main_folder\mm_yyyy"))
{
Directory.CreateDirectory(@"C:\main_folder\mm_yyyy");
}