Thank you, that works fine! that's exactally what i was looking for. I tried putting the "passive=off" command every else EXCEPT right after the open command.
I see that version 5.0.2 had an "Option to enable active mode with FTP protocol in scripting"
I have a need to do that but can not figure out how to set it in my script.
I have no trouble doing it interactively but i really need to have my script set it on the site i am connecting to.
p.s. i am using WinSCP version 5.0.5