I use Attachmate Reflection 14 to automate pulling files out of a third party vendor platform. Recently the third party switched to an SFTP setup and I am unable to connect to Reflection using the code below:
Sub ReflectionLogon() Dim Reflection As ReflectionFTP3
' Invoke an instance of WrqFtp component Set Reflection = CreateObject("Reflection.ftp") Reflection.StartLog ""
'Set up a Secure Shell connection using settings in the specified scheme Reflection.UseSSH = True Reflection.UseSFTP = True
' Connect to ftp.wrq.com with anonymous login Reflection.Connect "IP Address", 22, True
Reflection.Open "IP Address", "username", "password", , 22, True
Reflection.SetCurrentDirectory "Host Path"
Reflection.ReceiveFile "Local Path", "Host File to Transfer", rcBinary, rcOverwrite
Reflection.Close Set Reflection = Nothing
End Sub
I get the following error message at the "Reflection.SetCurrentDirectory" line of code:
Run-time error '-2147418113 (8000ffff)': Method 'SetCurrentDirectory' of object 'IReflectionFTP3' failed.
The code worked perfectly before the change to SFTP. Any ideas? Appreciate the time and help!!!
Aucun commentaire:
Enregistrer un commentaire