Hi Guys,
I have code that copies from path folder and then copies it over to the destination folder when button is clicked.
problem is it won't overide if there is bin file in that directory allready.
how can I over come this problem?
HTML Code:Imports System.IO Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim path As String = "c:\toolbox\nandpro\nand1.bin" Dim destination As String = "c:\toolbox\360multi\data\my360\nanddump.bin" If IO.File.Exists(path) And Not File.Exists(destination) Then IO.File.Copy(path, destination) Label1.Text = "File Copied Successfully" Else Label1.Text = "There is already a file called test.txt in the Destination Folder" End If End Sub End Class




Reply With Quote