0

I need some files from unix server. So, I am making sftp connection with password from my windows 7 machine to unix server. but, now i want to include all these commands in batch file. So, I need help on how should make sftp connection from batch file (basically, how to pass password to sftp prompt from batch file)?

Commands I am using:

> C:\Users\e578589>sftp

> server : TSEDCLVSAPPD116.svr.us.jpmchase.net

> user name : a_avatar

>a_avatar's Password:
/home/a_avatar>cd /data/ailsa/archive/open-loans-txns-to-bancs
/dev2/data/ailsa/archive/open-loans-txns-to-bancs> get {$FILENAME}
codiacTushki
  • 750
  • 1
  • 9
  • 22

2 Answers2

0

May be the following solution you can think for your unix/linus server as well.

Secure FTP using Windows batch script

Community
  • 1
  • 1
Rajesh Balan
  • 593
  • 2
  • 7
  • 20
0

How about PSCP - PuTTY Download Page? It is easy to use in batch script.

pscp.exe -P PORT -pw PASSWORD USERNAME@IPADDRESS:SOURCE_PATH DEST_PATH

Perhaps you can use PSFTP (PuTTY Download Page) in the same way.

KnightWhoSayNi
  • 570
  • 1
  • 5
  • 14