WinSCP defaults to the SFTP protocol on the port 22. If you want to use the FTP, you need to specify that explicitly.
Also username and password come in session URL as part of the open
command, not on separate lines. The passive mode is specified using the -passive=on
switch.
open ftp://myusername:mypassword@ftp.myserver.com -passive=on
The ascii mode is specified using the -transfer=ascii
switch of the put
command (though the separate ascii
command is also understood for compatibility):
put -transfer=ascii C:\temp\test.xml test.xml
It's the exit
, not the quit
.
See the complete guide for converting Windows FTP script to WinSCP.
You should also read the guide to automating file transfers to FTP server.