I have created a .txt file and saved it as abc.txt. I'm trying to use this to download files from a remote server.

The contents of the said .txt file are:

option batch abort
option confirm off
open stfp://root:password@123.456.789.2/ -hostkey="ssh-rsa AA:BB:CC:12:22"
get %1%

I'm trying to run this file via command prompt. So I've opened the cmd prompt, and enter commands as follows

cd  C:\Program Files (x86)\WinSCP

winscp E:\Ritesh\abc.txt /parameter // file.csv

file.csv being the remote file I want to download. However, this is not working. I can't figure out why. Please help


You are missing the /script switch:

winscp /script=E:\Ritesh\abc.txt /parameter // file.csv
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.