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
 
Back
Top