Cannot download using sftp
Hi:
I want to download file automatically.I saved this script in .txt file and call the .txt file in command prompt:-
# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect
open "CDN" -hostkey="ssh-rsa 1024 fe:8f:d9:c0:5b:a4:f8:bf:91:4f:80:41:36:7b:38:87"
# Change remote directory
cd /home/user
# Force binary mode transfer
option transfer binary
# Download file to the local directory d:\
get test.txt c:\
# Disconnect
close
# Exit WinSCP
exit
I can see that it is connecting but it doesnt copy file to c:\.Any idea where is the problem
I want to download file automatically.I saved this script in .txt file and call the .txt file in command prompt:-
# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect
open "CDN" -hostkey="ssh-rsa 1024 fe:8f:d9:c0:5b:a4:f8:bf:91:4f:80:41:36:7b:38:87"
# Change remote directory
cd /home/user
# Force binary mode transfer
option transfer binary
# Download file to the local directory d:\
get test.txt c:\
# Disconnect
close
# Exit WinSCP
exit
I can see that it is connecting but it doesnt copy file to c:\.Any idea where is the problem