VB6 scripting example

Advertisement

mrusu
Guest

VB6 scripting example

Hello,

Is it possible to include a "Full VB6 Example" together with existing "Full VB.NET Example" and "Full C# Example" in the scripting documentation?
I am having problems converting the VB.Net scripting code into classic VB (Visual Basic 6).

The reason I need VB6 code is that I would like to run WinSCP scripts from an MS Access database (that can only be coded using VB6).

Any help will be greatly appreciated.

Kind regards,
M. Rusu

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: VB6 scripting example

I do not have any experience with VB, so I cannot. Maybe some other user may help.
_________________
Martin Prikryl

Reply with quote

Slinnako
Guest

VB6 code for Winscp

Hi
I have tried the following code from VB6, first the one line command, inside the file sftptask.cmd : C:\WinSCP\winscp.com /script=c:\ftpscr.ftp /log=c:\log\201010_newftp.log
And the script file ftpscr.ftp includes :

option batch abort
option confirm off
open sftp://nnnnnn:yyyyyyy@newftp.zzzzzz.com -hostkey="ssh-rsa 1024 abcdef1234567890"
option transfer binary
cd /pub/data_transfer
put c:\log\2010-10-25-881435.txt
get /pub/to_incap/*.txt c:\
close
exit
, but this is not working from VB6 shell, like retval = Shell(ftpcmd, vbNormalFocus)
It kicks me out in somewhere after login... BUT, when I run this same sftptask.cmd from the command prompt, it WORKS succesfully ! Pls., anyidea why it does not work from VB6 ?

thanks

seppo

Reply with quote

mrusu
Guest

RE: VB6 code for Winscp

Hi seppo,

I did some research on this, it seems that VB.Net functionality in the code samples section cannot be easily implemented in VB6.
Therefore I looked for an SFTP Activex client and did some testing with Chilkat SSH/SFTP ActiveX.
https://www.chilkatsoft.com/ssh-sftp-activex.asp
It seems to work very well in VB6.

Regards,
M. R.

Reply with quote

mrusu
Guest

RE: VB6 code for Winscp

Also, consider the ideea to write a VB.Net DLL based on VB.Net code examples found on this site, expose the functions and call them from VB6 (you'll have to add a reference to this DLL).

Regards,
M. R.

Reply with quote

Advertisement

You can post new topics in this forum