filrst i am saving .wav file path into text file and record file stored into a folder
my code is below
protected void save_Click(object sender, EventArgs e)
{
string websitePath = Request.PhysicalApplicationPath;
tring dirname = "D:/Windows Masterspell";
string appPath = HttpContext.Current.Request.ApplicationPath;
string filename = "TRecord.txt";
string i = websitePath + "\\TRecord.txt";
if (System.IO.File.Exists(i))
{
using (System.IO.StreamWriter sw = new System.IO.StreamWriter(i, true))
{
string date = DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss");
string currentPath = HttpContext.Current.Request.MapPath(appPath);
if (!Directory.Exists(websitePath + "RecordSounds"))
Directory.CreateDirectory(websitePath + "RecordSounds");
DirectoryInfo myDirectoryInfo = new DirectoryInfo(dirname );
string k = apppath + "\\RecordSounds\\" + date + ".wav";
mciSendString("save recsound " + k + "", "", 0, 0);
mciSendString("close recsound ", "", 0, 0);
sw.WriteLine("" + TextBox1.Text + "," + "user" + "," + k + "");
}
}
}
here i am saving recordfile ino a folder my problem is create folder is success but .wav file is not stored in folder ""RecordSounds"