Re: Capturing Winscp return code in the script
Please read documentation:
https://winscp.net/eng/docs/guide_automation#results
https://winscp.net/eng/docs/guide_automation#results
WinSCP.com
commandline return code?
winscp.com /console /script="C:\Winscp_testing\WinSCP_script.txt" /xmllog="C:\Winscp_testing\log1.xml"
# Abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using a password
open sftp://usename:pwd@abc.com
# Change remote directory
cd cps_dev
# Download file to the local directory
mv *.pdf C:\Winscp_testing\
# Disconnect
close
# Exit WinSCP
exit