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

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 successfully! Pls., anyidea why it does not work from VB6?

Thanks
Seppo

Reply with quote

Advertisement

You can post new topics in this forum