Do you know that , In C#.Net it is possible to check directory is exist on a particular path on a system using System.IO library.
This will be great help when we want to implement the software on a system, with folder structure we are using to store out put or backup folder structure. The following simple function may help you
using System.IO; | |
public static void AutoCreateDirectory(string dpath) | |
{ | |
try | |
{ | |
if (!Directory.Exists(dpath)) | |
{ | |
Directory.CreateDirectory(dpath); | |
} | |
} | |
catch (Exception ee) | |
{ | |
MessageBox.Show(ee.Message.ToString()); | |
} | |
} |