Topic "VB6 scripting example"

Author Message
mrusu

Guest


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
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
I do not have any experience with VB, so I cannot. Maybe some other user may help.
_________________
Martin Prikryl
Slinnako

Guest


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
mrusu

Guest


mrusu

Guest


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.
http://www.chilkatsoft.com/ssh-sftp-activex.asp
It seems to work very well in VB6.

Regards,
M. R.
mrusu

Guest


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.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License