By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,986 Members | 2,042 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,986 IT Pros & Developers. It's quick & easy.

FileInfo.CopyTo

P: n/a
In VB I use FileInfo.CopyTo and get an error when the destination file
already exists. What do I use to copy to a destination and write over the
existing file?

Thanks,
Jon
Apr 25 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hello Jon,

Set the TRUE in the second params of FileInfo.CopyTo
http://msdn2.microsoft.com/en-us/lib...82(VS.71).aspx

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

JJIn VB I use FileInfo.CopyTo and get an error when the destination
JJfile already exists. What do I use to copy to a destination and
JJwrite over the existing file?
JJ>
JJThanks,
JJJon
Apr 25 '07 #2

P: n/a
Excellent! Thank you very much.

"Michael Nemtsev" wrote:
Hello Jon,

Set the TRUE in the second params of FileInfo.CopyTo
http://msdn2.microsoft.com/en-us/lib...82(VS.71).aspx

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

JJIn VB I use FileInfo.CopyTo and get an error when the destination
JJfile already exists. What do I use to copy to a destination and
JJwrite over the existing file?
JJ>
JJThanks,
JJJon
Apr 25 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.