If the folders exists, the next experimental program should work:
static void Main( string[] args )
{
string File1;
bool allowappend = true;
File1 = "C:/cmp3g/CODECO_ERROR_a/NewFile.txt";
using( StreamWriter sw = new StreamWriter( File1, allowappend, Encoding.Unicode ) )
{
sw.WriteLine( "Test" );
sw.WriteLine( );
}
}
Check if NewFile.txt is created by this program.