Topic "Automating winscp in VB 6"

Author Message
Dan Tabernsky

Guest


I know this might sound a little bit annoying(especially if this this post is already redundant), I need to know if I can create a variable in winscp to pass an error message from the linux server to winscp to the windows client.

Right now I am using a VB 6(Jurassic, please spare the hate) to automate the process of starting a Virtual Box Machine from a Windows XP to Linux Fedora. I already been able to automate the process of starting and putting it to savestate using your winscp(Astig, di ba? BTW I am not a native english speaker) but I am having an issue on error-trapping it since the only variable that I can count on is the exit code.

First question, is there any variable I can use to pass the error message from linux to your winscp and pass the error back to VB?

Second question, can I know the more details(other than the website) regarding the "ECHO" command in option? Since in other PLs it can be used as a return statement to give accurate error messages.

I know sound like a real ahole(in fact I am) in leeching your program and asking questions(if not stupid) but I like your program and will continue to use and endorse it to my colleagues and friends(sorry, living in a 3rd-world is a real pain so for now I won't be able to donate).
Advertisements
Dan Tabernsky

Guest


I'm sorry for being rude but I would like to ask another question.

Can I know why is winscp reporting an error message when using a call command of savestate in linux?

Here is the situation:
First, using a windows client I open the winscp through command line
Second, opening the connection using IP address:
"open XXXXX:XXXXXX@XXX.XXX.XX.XX"
Third, after opening the linux computer I use the code:
"call vboxmanage startvm /XXX/XXX/XXX.vbox"
to open the the virtual machine
Fourth, after playing around the virtual machine inside linux I put in the code:
"call vboxmanage controlvm XXX savestate"
the output that I got on putty was like this:
"10...20...50...80...90...100%"
but in winscp I got was this:
"10...20...50...80...90...100%"
"Command vboxmanage controlvm XXX savestate"
"failed with return code 0 and error message"
"10...20...50...80...90...100%"
the command will still go through but the winscp will give an error code 1 because of that
Can I know what went wrong?
I do apologise for my behavior in the last post.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Dan Tabernsky wrote:
I know this might sound a little bit annoying(especially if this this post is already redundant), I need to know if I can create a variable in winscp to pass an error message from the linux server to winscp to the windows client.

You cannot set any variable in WinSCP. Btw, what is source of the message you want to pass back?
_________________
Martin Prikryl
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Dan Tabernsky wrote:
Can I know why is winscp reporting an error message when using a call command of savestate in linux?

WinSCP reports error when the custom command prints anything on the error output. You can possibly prevent that by output redirection:
call vboxmanage controlvm XXX savestate 2>&1
Though it is just suggestion, I haven't tried that.
_________________
Martin Prikryl
Dan Tabernsky

Guest


prikryl wrote:
WinSCP reports error when the custom command prints anything on the error output. You can possibly prevent that by output redirection:
call vboxmanage controlvm XXX savestate 2>&1
Though it is just suggestion, I haven't tried that.


Thanks for replying! Very Happy The suggestion was very appreciated but your logs were so useful to the point that I just created a function to read the text in the logs and get the exact output made by the linux machine to provide an output if the command worked or not!Very Happy

All I needed was to study your Guides!

Thank you so much for giving your Winscp the Absolute Return Statement that I need! Very Happy
Also, thank you so much creating such a COOL(Astig) program! Very Happy
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