martin wrote:
See
https://winscp.net/eng/docs/scriptcommand_call
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