Post a reply

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

RealDeal

Script with Password

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.