Topic "Script has stopped working"

Author Message
Gallusnation

Guest


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:

Quote:
# 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)
open HousingPartners
# Force binary mode transfer
option transfer binary
# Upload file with the mask to the remote directory
put "HHExtract*.xlsx"

# Exit WinSCP
exit


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?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26299
Location: Prague, Czechia
The script uses some obsoleted commands (like option transfer), but all of them are still working in the latest version of WinSCP.

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
Guest




Hi,

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.

Thanks,
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License