Filecopy – overwrite file in vb.net

An easy file copy method in vb.net

FileToCopy = Original file name.
NewCopy = New file to overwrite with.

        If System.IO.File.Exists(FileToCopy) = True Then
            System.IO.File.Copy(FileToCopy, NewCopy, overwrite:=True)
        End If

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.