This is an old revision of the document!
Why I cannot connect/transfer using script, when I can using GUI (or vice versa)?
There are two common reasons for that:
- You run script from a different environment (under a different account/service; with a different configuration) than the GUI. See another F.A.Q.1
- You have your session configured differently in the script and in the GUI.
- Use a Generate URL command to avoid common mistakes in manually typed URL’s.
- You may possibly have some special characters in a session URL in the script.
- Try using the GUI site from the script, using an
open <site>
command to see, to see if it makes the script working. Though do not use this solution for a production code. It’s not recommended to rely on a GUI configuration in the script.
Advertisement
You can also enable a session logging both in the GUI (on Logging page of Preferences dialog) and the script (using a command-line parameter /log
) and compare the logs to find out what is different. Use a command-line parameter /loglevel=*
to enable a password logging and check if a correct password is used.
If you decide to seek a 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).
- Debugging transfer task running in Windows Scheduler, SSIS or other automation service.
- Although it covers a different topic, its recommendations are valid for this case as well.Back