Posted: 2005-09-20 23:01
I need to automate SFTP using Winscp. I have created a script file that turns BATCH on and CONFIRM off and the file is uploaded. Problem is, this will be an unattended process. I need a way of determining if there were any errors and then report it to proper personnel. How do I determine if there were any errors.
Here is my script:
# Automatically answer all prompts negativelly not to stall
# the script on errors
option batch on
# Disable overwrite confirmations that conflict with previous
option confirm off
# Force binary mode transfer
option transfer binary
# Upload file to current working directory
# Exit WinSCP
I am calling Winscp from within Visual FoxPro with its run command.
Location: Prague, Czechia
WinSCP returns exit code 1 on any error. Please refer to the documentation.
You can post new topics in this forum
And it's free!