We have to write a file in one drive (L) which is the shadow copy of the C drive. We tried with normal like below.
string datFile = "L:\\DATA\\ABC.DAT";
string message = "test";
try
{
using (StreamWriter writerAppend = new StreamWriter(datFile, true))
{
writerAppend.WriteLine(message);
}
}
But it is giving error
System.IO.DirectoryNotFoundException: Could not find a part of the path 'L:\DATA\ABC.DAT
Please help if there is any specific way to access it.