I need to transfer a file from another machine to my local machine everyday.
I have the following code. It is establishing a connection but fails to transfer the file. It has to transfer Vendors.mdb from C:\Pda folder in another machine to C:\Pda folder in my machine. The transfer doesn't go through. Can any of you tell me where I am going wrong?
This is my VB code -
Private Sub Form_Load()
Dim Remote, strSource, strDestination, strCommand
Dim WentOK As Boolean
Dim bResult As Boolean
Set Remote = CreateObject("AWREM32.APPLICATION"

WentOK = Remote.awConnect("C:\Documents and Settings\All Users\Application Data\Symantec\pcAnywhere\Vendor.CHF"
If WentOK = False Then
MsgBox "Connection failed"
Else
MsgBox "Connection OK"
End If
'Transfer from Host
strSource = "C:\Pda\Vendors.mdb"
strDestination = "C:\Pda\Vendors.mdb"
WentOK = Remote.FileXferFromHost(strSource, strDestination)
If WentOK = True Then
MsgBox "Transfer from host successful"
ElseIf WentOK = False Then
MsgBox "Transfer from host not successful"
End If
' Disconnect from the host
WentOK = Remote.awDisconnect()
Unload Form1
End Sub