Im getting this error. Even though i already created a folder "CMSExportedData" Could not find a part of the path 'C:\CMSExportedData\Sales-20\07\2012.txt'.
Kindly help please
using (FileStream fs = new FileStream("C:\\CMSExportedData\\Sales-" + DateTime.Now.ToString("dd/MM/yyyy") + ".txt", FileMode.Create))
{
using (StreamWriter sw = new StreamWriter(fs, Encoding.Default))
{
//use stream
}
}
20\07\2012: well, do you really think that it's a good idea to have a date with slashes in a path ?