Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


Figured it out.

WinSCP was using a pre-defined connection instead of the info passed in the script, and the pre-defined connection happened to be sitting in the directory I was CDing to.

Deleted the pre-defined connection and it's all back to normal.

What a mess. I'm going to use a different solution.

Script is executing a command twice!

I've had a script in place for at least a year that's worked without flaw. Just installed it on a new machine (with a later version of WinSCP) and it's executing a CD command twice.

I can't for the life of me think what could be happening.

It's the simplest script possible. Change directories on both sides, put some files, exit. In the log, though, the CD is being executed twice!

Encoding error? Is it echoing the commands and interpreting the echo as a second command?

open sftp://xxxxxx@xxxxxxxxx/ -hostkey="xxxxxxxxxx" -privatekey="xxxxxxxx" -passphrase=xxxxxxx
lcd "d:\xxxxxx\xxxxxxx"
option transfer auto
option batch on
PUT -resumesupport=off *