Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SFTP with Attachmate in VFP9 1

Status
Not open for further replies.

ppoole

Programmer
Sep 9, 2011
9
US
Hello,

I have been able to use Attachmate for file transfer from the mainframe but the computer police does not like that it is not secure.

LOCAL oFTP as Reflection.FTP
oFtp = CreateObject("Reflection.FTP")
oFtp.Open("PLP403.sys.eds.com")
oFtp.ReceiveFile("c:\temp\data.txt", "'blah.blah.blah(0)'",0,1)
oFtp.Close
oFtp = null

This works, but I do not know how to convert it to SFTP. I can see methods UseSFTP, UseTLS, etc. but not sure how to tell it to use the secure connection "Cami" that I set up in the Attachmate Refection software.

Thanks
Paul
 
look at West-Wind wwFTP class

it works great with secure server.


Ali Koumaiha
TeknoSoft Inc.
Michigan
 
Thanks Ali,

Attachmate is the only approved software I can use for FTP by our company.

Paul
 
Looks like a job for the Attachmate documentation, doesn't it?

Bye, Olaf.
 
Yes, you are correct, and have tried, but I am not getting very far with that. The examples are all VB and just for regular FTP. Not alot of info on SFTP. The Attachmate foxpro expert is not available right now, so I was hoping someone in the tek-tip community has used this and could help.

Thanks
Paul
 
Taken from:
Code:
oFTP.UseSFTP = True

Looks too simple. I can imagine there is more to it than that, eg setting up a public key for encryption.

Actually such COM automation servers are quite 1:1 translatable, you have an object variable oFTP in VB and in VFP, And from that moment on, the syntax is equal in any language. List of properties and methods... Of course True in VB is .T. in VFP.

Bye, Olaf.
 
Thanks olaf.

Wow, I am a bonehead. I kept trying UseSFTP()=.T. and the intellisense said it was not right. Did not clue in that the brackets were not needed.

Sorry for asking a question, I should have figured out.

Thanks
Paul


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top