Bute there's an error...
Error: The given path's is not supported

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click


        Dim FileToCopy As String
        Dim NewCopy As String
        Dim password As String = "Cyndy"
        Dim username As String = "Abbang"
        'NewCopy = "192.168.xx.xx\c$\HS.exe" & username & ":'" & password
        'FileToCopy = "c:\HS.exe"
        FileToCopy = "\\192.168.xx.xx\C$\BACKUP\HRIS.exe"
        NewCopy = "C:\HRIS.exe" & username & ":'" & password

        If System.IO.File.Exists(FileToCopy) = False Then

            System.IO.File.Copy(FileToCopy, NewCopy, False)

            MsgBox("File Uploaded Successfully")

            MsgBox("File Copied")
            MsgBox("cannot copy")
        End If

    Catch ex As Exception
    End Try

End Sub

Recommended Answers

All 3 Replies

Instead of the ip address, type


Still now working..

FileToCopy = "\\PROD-PC\C$\BACKUP\HRIS.exe"

make sure that this path exist:
start >> Run >> \PROD-PC\C$\BACKUP\
if it doesn't exist then you are goin to need to share your hard drive "C" then it'll appear in that directory "\PROD-PC".

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.