Topic "Script with Password"

Author Message
RealDeal
[View user's profile]

Joined: 2011-12-09
Posts: 1
Location: Calgary
Hi There,

I am creating a simple script to download some files from an SFTP server. I need to automate this so will use Windows for that. How do I input the password for the SFTP server? I always getting prompted when I run the .bat which just calls the .txt file.

run.txt =
open <Session Name>
synchronize local "C:\SFTPtest" "/"
exit

run.bat =
C:\Progra~2\WinSCP\WINSCP.exe /console /script=run.txt

It works, just prompts me for the password everytime. I also have the option of Private key and passphrase...how can I script that? New to all this.

Thanks
RD.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
I have added a note on automatic login to open command page:
https://winscp.net/eng/docs/scriptcommand_open
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License