Reputation: 11
I have a data file in f:\ drive named 'cd.txt'. I want to write this file to a CD i.e E:\.
String source ="F:\\cd.txt";
String destination="E:\\cd.txt";
File.copy(sorce,destination);
The above line is throwing exception saying:
"Access to the path 'E:\cd.txt' is denied"
Upvotes: 1
Views: 388
Reputation: 351
IMAPI is only for C++, is there a good wrapper for C#? o maybe a library? i used the project wrapper from the codeproject page.. i haven't test it, all i did was exclude the Interop folder and moved it to another project to try and build the winform in WPF.. therefore i excluded the Interop to a single class project for a DLL... will test it this week..
Upvotes: 0
Reputation: 3046
You cant just copy files to a disc drive. Writing files to a CD-R is a complicated process.
I have heard of a C# .NET component called XPBurn. I have not used it, but it looks like it'll do what you need using the IMAPI Interfaces.
Upvotes: 0