Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Connection refused

Please attach a session log file from both sessions.
mcifuentes31

Connection refused

I am running into "The server rejected SFTP connection, but it listens for FTP connections. Did you want to use FTP protocol instead of SFTP?" error. Interestingly, I only get this error when running the commands as part of a txt file in a batch script. If I run the lines themselves I do not get the error. Example:

"C:\Program Files (x86)\WinSCP\winscp.com"
open ftp://username:password@example.com/
get /file.csv "path for save" -neweronly
exit

This works just fine, but when I run it like this:

Batch
"C:\Program Files (x86)\WinSCP\winscp.com" /script=path\FTP_Download.txt
FTP_Download.txt
open ftp://username:password@example.com/
get /file.csv "path for save" -neweronly
exit

I get the error. I want to be able to run the batch file to automate this process. New at this so sorry if the code offends you.