Tenkasi Subramanian
Tenkasi Subramanian

Reputation: 37

How to load local file to WINSCP with password?

I used codes in below link with my batch script. But it is asking for password. When I provided pw with password it is not working. First Time it is aking for yes or no when I try in command prompt. In second try it is not asking like that. So I need batch script which need to load local file to WINSCP with password. Also need to answer y.

https://www.ssh.com/ssh/putty/putty-manuals/0.68/Chapter5.html

Sample code I used in batch script:

pscp c:\documents\foo.txt [email protected]:/tmp/foo
pw Exam454656.

Upvotes: 0

Views: 195

Answers (1)

user7818749
user7818749

Reputation:

pscp has some specific parameters. -pw is the one you are looking for.

pscp -pw Exam454656 c:\documents\foo.txt [email protected]:/tmp/foo

Upvotes: 1

Related Questions