I'm using WinForms. In my form i have a button. When i press that button i want to copy a Tif image to another location and name it display.tif. I've browsed the internet for solutions but they all say use "Fil.copy()" so i tried that and it keeps giving me an error.
This is my code below:
private void Display_Button_Click(object sender, EventArgs e)
{
File.Copy(@"âĒC:\image\Source_File\Display.tif", @"C:\image\Source_File\Destination_File\display.tif", true);
}
and this is the error which i keep on getting. Why do i have this error?
Something Interesting i discovered:
It seems like when you copy and paste the directory from the file properties the code doesn't recognize it even though all the letters look the same. I had to hand write the file path to make it work properly. (right click on the file - the properties should be at the bottom)