Error trapping during Automated Script

Advertisement

doug
Guest

Error trapping during Automated Script

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
put c:\data\temp\test.txt
# Disconnect
close
# Exit WinSCP
exit
------------------

I am calling Winscp from within Visual FoxPro with its run command.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum