WinSCP Batch Script Started Failing. Not sure why.
We have a WinSCP batch script that suddenly stopped working. Was hoping someone might have some ideas on possible causes.
We are calling WinSCP in batch mode as:
C:\Program Files (x86)\WinSCP\WinSCP.exe /console /passive=on /script="C:\Program Files (x86)\ftpscript.txt" /log="C:\Program Files (x86)\log.txt"
Here is the contents of our connection script "ftpscript.txt" referenced above that we are calling from a batch script.
### START FTP SCRIPT ###
option batch abort
option confirm off
open ftp://username@mysite.com:mypassword@mysite.com/
option transfer binary
put E:\Path\To\Filename.7z
close
exit
### END FTP SCRIPT ###
Please note the usernames for our FTP server require username@mysite.com format. That's not an error.
Note that I changed the host/user/pass for security reasons.
Here is the log (log.txt) from the FTP session.
2020-01-08 02:31:04.531 Connecting to mysite.com ...
2020-01-08 02:31:04.577 Connected with mysite.com. Waiting for welcome message...
2020-01-08 02:31:04.646 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
2020-01-08 02:31:04.646 220-You are user number 3 of 100 allowed.
2020-01-08 02:31:04.646 220-Local time is now 02:31. Server port: 21.
2020-01-08 02:31:04.646 220-This is a private system - No anonymous login
2020-01-08 02:31:04.646 220-IPv6 connections are also welcome on this server.
2020-01-08 02:31:04.646 220 You will be disconnected after 15 minutes of inactivity.
2020-01-08 02:31:04.646 USER johndoe@mysite.com
2020-01-08 02:31:04.646 500-Unrecognized command format. Please provide user and password information according to
2020-01-08 02:31:04.657 500-the following format:
2020-01-08 02:31:04.657 500- User: [proxy_user:[proxy_passwd:[proxy_token:]]]remote_user
2020-01-08 02:31:04.657 500- Pass: [proxy_passwd:[proxy_token:]]remote_passwd
2020-01-08 02:31:04.657 500
2020-01-08 02:31:19.537 Timeout detected. (control connection)
2020-01-08 02:31:19.537 Connection failed.
Any ideas why it might be failing after the USER command?
Thanks.
John
We are calling WinSCP in batch mode as:
C:\Program Files (x86)\WinSCP\WinSCP.exe /console /passive=on /script="C:\Program Files (x86)\ftpscript.txt" /log="C:\Program Files (x86)\log.txt"
Here is the contents of our connection script "ftpscript.txt" referenced above that we are calling from a batch script.
### START FTP SCRIPT ###
option batch abort
option confirm off
open ftp://username@mysite.com:mypassword@mysite.com/
option transfer binary
put E:\Path\To\Filename.7z
close
exit
### END FTP SCRIPT ###
Please note the usernames for our FTP server require username@mysite.com format. That's not an error.
Note that I changed the host/user/pass for security reasons.
Here is the log (log.txt) from the FTP session.
2020-01-08 02:31:04.531 Connecting to mysite.com ...
2020-01-08 02:31:04.577 Connected with mysite.com. Waiting for welcome message...
2020-01-08 02:31:04.646 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
2020-01-08 02:31:04.646 220-You are user number 3 of 100 allowed.
2020-01-08 02:31:04.646 220-Local time is now 02:31. Server port: 21.
2020-01-08 02:31:04.646 220-This is a private system - No anonymous login
2020-01-08 02:31:04.646 220-IPv6 connections are also welcome on this server.
2020-01-08 02:31:04.646 220 You will be disconnected after 15 minutes of inactivity.
2020-01-08 02:31:04.646 USER johndoe@mysite.com
2020-01-08 02:31:04.646 500-Unrecognized command format. Please provide user and password information according to
2020-01-08 02:31:04.657 500-the following format:
2020-01-08 02:31:04.657 500- User: [proxy_user:[proxy_passwd:[proxy_token:]]]remote_user
2020-01-08 02:31:04.657 500- Pass: [proxy_passwd:[proxy_token:]]remote_passwd
2020-01-08 02:31:04.657 500
2020-01-08 02:31:19.537 Timeout detected. (control connection)
2020-01-08 02:31:19.537 Connection failed.
Any ideas why it might be failing after the USER command?
Thanks.
John