Connection refused

Advertisement

mcifuentes31
Joined:
Posts:
1

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.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum