Writing a script in a batch file to fetch files from SSH
Hi ,
I am trying to write a script in a batch file to fetch the files from SSH server.
Have written the following code. But it does not seem to get the files from the server to my local machine.
Can you please tell me what could be going wrong?
Code:
# Automatically answer all prompts negativelly not to stall
# the script on errors
option batch on
# Disable overwrite confirmations that conflict with previous
option confirm off
# Connect
open gstar:gstar@3.49.4.80
# Change remote directory
cd home/data/fs/gstar/25_07_2005
# Force binary mode transfer
# Download file to local directory d:\
get gstar_currency.xml d:\
# Disconnect
close
# Exit WinSCP
exit
Where : gstar is the username and the password.
Your assistance would be highly appreciated.
Regards
Viki Lingeria
I am trying to write a script in a batch file to fetch the files from SSH server.
Have written the following code. But it does not seem to get the files from the server to my local machine.
Can you please tell me what could be going wrong?
Code:
# Automatically answer all prompts negativelly not to stall
# the script on errors
option batch on
# Disable overwrite confirmations that conflict with previous
option confirm off
# Connect
open gstar:gstar@3.49.4.80
# Change remote directory
cd home/data/fs/gstar/25_07_2005
# Force binary mode transfer
# Download file to local directory d:\
get gstar_currency.xml d:\
# Disconnect
close
# Exit WinSCP
exit
Where : gstar is the username and the password.
Your assistance would be highly appreciated.
Regards
Viki Lingeria