Posted: 2016-12-19 15:35
I've been using a generic 'put' script with WinSCP for years and not had any issues. The below script has stopped working, however, and I cannot find the reason why. The scheduled task outcome appears to state that a command is incorrect:
# Automatically answer all prompts negatively not to stall
# the script on errors
option batch on
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect to the session in WinSCP (defines folder locations)
# Force binary mode transfer
option transfer binary
# Upload file with the mask to the remote directory
# Exit WinSCP
This script was previously working fine with this scheduled task, but appears to have stopped working some time in the last 4 weeks. I had a similar task that also stopped working around the same time, however this appeared to be an issue with permissions on a suppliers SFTP server which has now been resolved. I've also double checked that the session name is correct.
Has one of the commands been deprecated or something?
Location: Prague, Czechia
The script uses some obsoleted commands (like
Please attach a full session log file showing the problem (using the latest version of WinSCP).
To generate the session log file, use
Posted: 2017-01-03 13:21
It turns out it was probably related to the Windows Scheduled task. I completely removed the task and set it up again and it is now working (no changes have been made to the script or to the commands used as parameters).
It may also have been an issue with permissions for the service account used to schedule the task. The script was not to blame however.
You can post new topics in this forum
And it's free!