Hi All,
Can anybody help me in finding this out?
I want to delete csv file using C#.Net?
I am using:-
File.Delete("E:\TestFolder\filename.csv");
OR
if (System.IO.File.Exists("E:\TestFolder\filename.csv"))
{
System.IO.File.Delete("E:\TestFolder\filename.csv");
}
But both above are giving exception as:-
Cannot access the file "E:\TestFolder\filename.csv" because it is being used by another process.
Test Folder is a shared folder and I am having full admin rights over the folder.
Your Help is highly appreciated.
Thanks & regards,
Manish