Topic "Script Stop with error on log after Call Command"

Author Message
Angelo

Guest


Hello,

I don't understand why this script stop after the Call Command.
The Command call produce a file but there are errors in the log and the Script attempt to connect again to the server....
I join the log file as attached

Thank you for your help

Angelo

option batch abort
option confirm off
open sftp://idbut:prod76@55.5.5.555
open scp://idbut:prod76@55.5.5.555
cd /app/fic

#Care ferme la session....
#apparemment ouvre une session au moment du Call !!!
call tar cvf - /app/sql/ | gzip -c > MIsql22.tar.gz

option transfer binary
get *.gz D:\Exploitation\w\
close
exit
#Lancement
#C:\PROGRA~1\WinSCP\winscp.com /script=D:\Exploitation\w\CDESWI~1\winscpscpcallforum1.txt /log="D:\Exploitation\w\CDESWI~1\\winscpscpcallforum1.log" /loglevel=2
winscpscpcallforum1.log (12.66 KB) [Download]

Description: Log file

Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
See http://winscp.net/eng/docs/scriptcommand_call

Quote:
It is an error, if the command has any error output, but no standard output. To circumvent that redirect the error output to nul (2>/dev/null) or to the standard output (2>&1).

_________________
Martin Prikryl
Angelo

Guest


prikryl wrote:
See http://winscp.net/eng/docs/scriptcommand_call

Quote:
It is an error, if the command has any error output, but no standard output. To circumvent that redirect the error output to nul (2>/dev/null) or to the standard output (2>&1).



thank you, but the result is the same as soon as i use a call command. Get and put Commands are OK but after a Call, all the commands abort.

"
option batch abort
option confirm off

#open sftp://id:prod@55.5.5.555
open scp://id:prod@55.5.5.555

cd /app/g/fic
call ls -l 2>/dev/null
#call ls -l /dev/null 2>&1


option transfer binary
get *.gz D:\Expit\\PR\
close

exit


In the log file joined :
unalias "ls" ; echo "WinSCP: this is end-of-file:$?"
WinSCP: this is end-of-file:0

....
2015-02-25 14:50:44.271 Commande échouée avec pour code de retour 127.
2015-02-25 14:50:44.271 Script: Failed
2015-02-25 14:50:44.271 Script: Exit code: 1
2015-02-25 14:50:44.271 Closing connection.
2015-02-25 14:50:44.271 Sending special code: 12
2015-02-25 14:50:44.271 Sent EOF message
winscpsimpleCallforum.log (17.06 KB) [Download]

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Angelo wrote:
thank you, but the result is the same as soon as i use a call command. Get and put Commands are OK but after a Call, all the commands abort.

Well, the error message says it. The command has non-zero exit code. You previous command (tar) had exit code 0, so the redirection would help.
_________________
Martin Prikryl
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