I'm trying to copy files from a remote windows server to Unix server. I was successfully able to copy files from windows server using command prompt but when I run these commands from a script it's not working as expected. commands used:
sftp user@remoteserver.com
lcd local_dir
cd remote dir
get file_name
exit
When I run these commands from a script the script is stopping after it connects to the remote server.
Connected to remote server
sftp>
Can anybody tell me how to fix this issue.