Re: wodSFTPdll - using VB Script - WeOnlyDo Discussion board

Re: wodSFTPdll - using VB Script (General questions)

by wodSupport, Wednesday, September 08, 2004, 16:52 (7379 days ago) @ Douglash

Douglash,

here's simple VBS file that will connect to the server and give you listing of / directory. I put comments arround 'GetFile' call - you can call GetFile/PutFile to transfer files too, one after another, in the sequence.
[code]
Dim sftp
set Sftp = CreateObject( WeOnlyDo.wodSFTPCom.1 )
sftp.Blocking = 1
sftp.Hostname = your_hostname
sftp.Login = your_login
sftp.Password = your_password
sftp.Connect
' if you get an error, you can trap it here
'sftp.GetFile c: emp , /home/joe/somefile
sftp.ListDir /
wscript.echo sftp.ListItem
sftp.Disconnect[/code]

Hope I helped.
Kreso


Complete thread: