1
1
I am working on a bat file wherein I have to login to a remove server through SFTP with WinSCP and execute a shell script and get a file to system from the remote server.
Below is the code.
cd C:\Program Files\WinSCP
winscp.com sftp://userid:password@hostname
cd /var/tmp
call ./script.sh
get /var/tmp/log.txt C:\Preeti\log.txt
exit
However, while executing this file, it stops execution after the second line. I am new to this, please let me know where I am going wrong. Thanks in advance for all the help.
You need to put your winscp commands in a script file
– DavidPostill – 2016-04-28T12:41:18.610