Hi,
I tried to write a utility for copy video file from DVD-RW Rom. When I
tried to access file from DVD-RW ROM, it trows exception "Access to
the path 'J:\VIDEO_TS\VIDEO_TS.BUP' is denied.". I tried below code
for file copy utility.
private void butCopyFile_Click(object sender, EventArgs e)
{
try
{
FileStream readFile = new FileStream(this.txtSourcePath.Text,
FileMode.Open);
FileStream writeFile = new
FileStream(this.txtDestinyPath.Text, FileMode.OpenOrCreate);
int rByte = 0;
while (rByte != -1)
{
rByte = readFile.ReadByte();
if (rByte != -1)
{
writeFile.WriteByte((byte)rByte);
}
else
{
MessageBox.Show("EOF");
}
}
writeFile.Close();
readFile.Close();
MessageBox.Show("Successful Complete!!!");
}
catch (UnauthorizedAccessException exp)
{
MessageBox.Show(exp.Message);
}
}
}
Please guide me, what I missed in code? and how I can access file from
DVD-RW?
Regards,
-aimslife