There are two common reasons for that:
open <site> command to see, if it makes the script working.
You can also enable session logging both in GUI (on Logging page of Login dialog) and script (using command-line parameter /log) and compare the logs to find out what is different.
If you decide to seek help, make sure you provide both complete logs when describing your issue.
See also more generic article on making WinSCP work in a new environment (operating system, machine, user account, network).
Site design by Black Gate