After long struggle i myself found the code and executed.
Inside the Menu click created these method and executed.
string msg = null;
ClearFolder(msg);
private void ClearFolder(string FolderName)
{
string[] delete_files_2DData = null;
string[] delete_files_Data = null;
string[] datafile = null;
try
{
delete_files_2DData = Directory.GetFiles(Environment.CurrentDirectory + "\\DB\\2DData\\" + Global.CreatedProjectName + "\\");
string file = System.IO.Path.GetDirectoryName(Environment.CurrentDirectory + "\\DB\\2DData\\" + Global.CreatedProjectName + "\\");
datafile = Directory.GetFiles(Environment.CurrentDirectory + "\\Data\\");
string prf = "" + Global.CreatedProjectName;
string rname = "" + "Run" + Global.RunOpend;
foreach (string data_file in datafile)
{
string[] datafilpath = data_file.Split('\\');
string[] finalpath = datafilpath.Last().Split('_');
if (finalpath.Contains(prf))
{
File.Delete(data_file);
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}