FileInfo.CopyTo

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Hello Jon,

Set the TRUE in the second params of FileInfo.CopyTo
http://msdn2.microsoft.com/en-us/library/aa328782(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

JJ> In VB I use FileInfo.CopyTo and get an error when the destination
JJ> file already exists. What do I use to copy to a destination and
JJ> write over the existing file?
JJ>
JJ> Thanks,
JJ> Jo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top