Copying file error.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • asmapanjabi
    New Member
    • Jan 2008
    • 10

    Copying file error.

    Hi m trying to copy image file from one location to other as below in openDialog box C#.net
    Code:
    if (openFileDialog1.ShowDialog() == DialogResult.OK)
    {
                string filename = System.IO.Path.GetFileName(openFileDialog1.FileName);
    
              string fname = Application.StartupPath + "\\Temp\\" + filename;
                    File.Copy(openFileDialog1.FileName, fname, true);
    }

    I get Exception as
    Unknown software Exception(0xe04 34f4d) ocurred in application at location 0x7c59bcb1
    It works for all files except for .bmp file
    Ne help for it?
Working...