473,386 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Copying file error.

Hi m trying to copy image file from one location to other as below in openDialog box C#.net
Expand|Select|Wrap|Line Numbers
  1. if (openFileDialog1.ShowDialog() == DialogResult.OK)
  2. {
  3.             string filename = System.IO.Path.GetFileName(openFileDialog1.FileName);
  4.  
  5.           string fname = Application.StartupPath + "\\Temp\\" + filename;
  6.                 File.Copy(openFileDialog1.FileName, fname, true);
  7. }

I get Exception as
Unknown software Exception(0xe0434f4d) ocurred in application at location 0x7c59bcb1
It works for all files except for .bmp file
Ne help for it?
Jun 23 '08 #1
0 891

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Richard Jonas | last post by:
I've written a Windows Application in C#.net that runs in the background and silently archives files to a network drive (using the System.IO.File.Copy function). Sometimes, users may run this...
5
by: TB | last post by:
Hi All: This news group is proving to be great help on my path towards mastering ASP.NET thanks to all of you helpful souls out there. I am looking forward to the day when I can contribute...
10
by: Martin Ho | last post by:
I am running into one really big problem. I wrote a script in vb.net to make a copy of folders and subfolder to another destination: - in 'from.txt' I specify which folders to copy - in...
2
by: .Net Believer | last post by:
I using the routine below to copy file to a network drive for a regular backup process. Before calling this routine I using another function to check the presence of the LAN connection and the...
16
by: NoodNutt | last post by:
G'day ppl Is there a process whereby I can copy the text labels of all the files in a root directory? I recall going back a long way seeing something about it but did not take any notice as I...
6
by: Jim Heavey | last post by:
I have written a little application which copies files from one location to another location. Before it copies the file, it ensure the directory for both the from and to locations is valid. It...
3
by: neeraj | last post by:
I have one Problem while File copying in ASP.net , When I trid to copy my file to other system on the same network I am getting the "Acces Denied" Error. Whereas I have have given all the...
2
by: jatphat | last post by:
Somebody help me. How do i copy my Access database from one location on my hard disk to another . i tried file.copy(source, distination ) but the file would not move. i always get this error ...
18
by: mike3 | last post by:
Hi. I have an interesting problem. The C program presented below takes around 12 seconds to copy 128 MB of data on my machine. Yet I know the machine can go faster since a copying done at a...
4
by: MAdcock | last post by:
Hi, I have created an excel program which creates 65 or more (nneds to be unlimited) customised letters for clients. The macro uses VLOOKUP to change the details within the letter and copies /...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.