Script is executing a command twice!

Advertisement

friedduck
Joined:
Posts:
2

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
cd IMAGE_FILES
lcd "d:\xxxxxx\xxxxxxx"
option transfer auto
option batch on
PUT -resumesupport=off *
exit

Reply with quote

Advertisement

friedduck
Joined:
Posts:
2

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.

Reply with quote

Advertisement

You can post new topics in this forum